Skip to content

Commit 3adf790

Browse files
committed
Complete Exchanger rewrite.
1 parent 06887c5 commit 3adf790

File tree

4 files changed

+583
-101
lines changed

4 files changed

+583
-101
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'

0 commit comments

Comments
 (0)