Skip to content

Commit 28f6d35

Browse files
committed
Merge pull request #396 from ruby-concurrency/exchanger
New Exchanger Implementation
2 parents a02de74 + 3adf790 commit 28f6d35

File tree

5 files changed

+584
-102
lines changed

5 files changed

+584
-102
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Thread-safe variables:
107107
* [CountdownLatch](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/CountDownLatch.html) A synchronization object that allows one thread to wait on multiple other threads.
108108
* [CyclicBarrier](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/CyclicBarrier.html) A synchronization aid that allows a set of threads to all wait for each other to reach a common barrier point.
109109
* [Event](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Event.html) Old school kernel-style event.
110+
* [Exchanger](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Exchanger.html)
110111
* [I-Structure](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/IVar.html) (IVar) Similar to a "future" but can be manually assigned once, after which it becomes immutable.
111112
* [M-Structure](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/MVar.html) (MVar) A synchronized single element container.
112113
* [ReadWriteLock](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/ReadWriteLock.html) A lock that supports multiple readers but only one writer.
@@ -132,7 +133,6 @@ be obeyed though. Features developed in `concurrent-ruby-edge` are expected to m
132133
* [Agent](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Agent.html): A single atomic value that represents an identity.
133134
* [Channel](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Channel.html):
134135
Communicating Sequential Processes (CSP).
135-
* [Exchanger](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Exchanger.html)
136136
* [LazyRegister](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/LazyRegister.html)
137137
* [AtomicMarkableReference](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Edge/AtomicMarkableReference.html)
138138
* [LockFreeLinkedSet](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Edge/LockFreeLinkedSet.html)
@@ -146,7 +146,6 @@ be obeyed though. Features developed in `concurrent-ruby-edge` are expected to m
146146
- **Future/Promise Framework** - API changes; partial documentation and tests; stability good.
147147
- **Agent** - Incomplete behaviour compared to Clojure's models; stability good.
148148
- **Channel** - Missing documentation; limted features; stability good.
149-
- **Exchanger** - Known race condition requiring a new implementation.
150149
- **LazyRegister** - Missing documentation and tests.
151150
- **AtomicMarkableReference, LockFreeLinkedSet, LockFreeStack** - Needs real world battle testing
152151

lib/concurrent.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
require 'concurrent/async'
1515
require 'concurrent/dataflow'
1616
require 'concurrent/delay'
17+
require 'concurrent/exchanger'
1718
require 'concurrent/future'
1819
require 'concurrent/hash'
1920
require 'concurrent/immutable_struct'

lib/concurrent/concern/logging.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Concern
99
module Logging
1010
include Logger::Severity
1111

12-
# Logs through {Configuration#logger}, it can be overridden by setting @logger
12+
# Logs through {Concurrent.global_logger}, it can be overridden by setting @logger
1313
# @param [Integer] level one of Logger::Severity constants
1414
# @param [String] progname e.g. a path of an Actor
1515
# @param [String, nil] message when nil block is used to generate the message

0 commit comments

Comments
 (0)