Skip to content

Commit 605cd61

Browse files
committed
Moved classes to Edge gem.
1 parent b81a70b commit 605cd61

File tree

6 files changed

+20
-16
lines changed

6 files changed

+20
-16
lines changed

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ This library contains a variety of concurrency abstractions at high and low leve
5252

5353
### High-level, general-purpose asynchronous concurrency abstractions
5454

55-
* [Agent](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Agent.html): A single atomic value that represents an identity.
5655
* [Async](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Async.html): A mixin module that provides simple asynchronous behavior to any standard class/object or object.
5756
* [Future](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Future.html): An asynchronous operation that produces a value.
5857
* [Dataflow](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent.html#dataflow-class_method): Built on Futures, Dataflow allows you to create a task that will be scheduled when all of its data dependencies are available.
@@ -66,11 +65,9 @@ This library contains a variety of concurrency abstractions at high and low leve
6665

6766
### Thread synchronization classes and algorithms
6867

69-
* [Condition](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Condition.html)
7068
* [CountdownLatch](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/CountDownLatch.html)
7169
* [CyclicBarrier](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/CyclicBarrier.html)
7270
* [Event](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Event.html)
73-
* [Exchanger](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Exchanger.html)
7471
* [Semaphore](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Semaphore.html)
7572
* [Timeout](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent.html#timeout-class_method)
7673
* [Timer](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent.html#timer-class_method)
@@ -81,7 +78,6 @@ This library contains a variety of concurrency abstractions at high and low leve
8178
* [AtomicFixnum](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/AtomicFixnum.html)
8279
* [AtomicReference](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/MutexAtomic.html)
8380
* [Delay](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Delay.html)
84-
* [LazyRegister](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/LazyRegister.html)
8581
* [I-Structures](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/IVar.html) (IVar)
8682
* [M-Structures](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/MVar.html) (MVar)
8783
* [Thread-local variables](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/ThreadLocalVar.html)
@@ -96,10 +92,13 @@ These features are under active development and may change frequently. They are
9692
keep backward compatibility (there may also lack tests and documentation). Semantic versions will
9793
be obeyed though. Features developed in `concurrent-ruby-edge` are expected to move to `concurrent-ruby` when final.
9894

99-
* [Actor](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Actor.html):
100-
Implements the Actor Model, where concurrent actors exchange messages.
101-
* [Channel](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Channel.html):
102-
Communicating Sequential Processes (CSP).
95+
* [Actor](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Actor.html):
96+
Implements the Actor Model, where concurrent actors exchange messages.
97+
* [Agent](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Agent.html): A single atomic value that represents an identity.
98+
* [Channel](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Channel.html):
99+
Communicating Sequential Processes (CSP).
100+
* [Exchanger](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/Exchanger.html)
101+
* [LazyRegister](http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/LazyRegister.html)
103102

104103
## Usage
105104

concurrent-ruby.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ Inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency pat
2626
if defined?(JRUBY_VERSION)
2727
s.files += Dir['lib/**/*.jar']
2828
s.platform = 'java'
29-
else
30-
s.add_runtime_dependency 'ref', '~> 1.0', '>= 1.0.5'
3129
end
3230

31+
s.add_runtime_dependency 'ref', '~> 1.0', '>= 1.0.5'
32+
3333
s.required_ruby_version = '>= 1.9.3'
3434
end

lib/concurrent-edge.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
require 'concurrent'
22

33
require 'concurrent/actor'
4+
require 'concurrent/agent'
45
require 'concurrent/channel'
5-
require 'concurrent/edge/future'
6-
6+
require 'concurrent/exchanger'
7+
require 'concurrent/lazy_register'
78

9+
require 'concurrent/edge/future'

lib/concurrent.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@
1212
require 'concurrent/utilities'
1313

1414
require 'concurrent/atomic/atomic_reference'
15-
require 'concurrent/agent'
1615
require 'concurrent/async'
1716
require 'concurrent/dataflow'
1817
require 'concurrent/delay'
19-
require 'concurrent/exchanger'
2018
require 'concurrent/future'
2119
require 'concurrent/ivar'
22-
require 'concurrent/lazy_register'
2320
require 'concurrent/mvar'
2421
require 'concurrent/promise'
2522
require 'concurrent/scheduled_task'

lib/concurrent/atomic/condition.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ module Concurrent
1111
# Every #wait must be guarded by a locked Mutex or a ThreadError will be
1212
# risen. Although it's not mandatory, it's recommended to call also #signal
1313
# and #broadcast within the same mutex
14+
#
15+
# @deprecated
1416
class Condition
1517

1618
class Result
@@ -37,6 +39,7 @@ def timed_out?
3739
end
3840

3941
def initialize
42+
warn '[DEPRECATED] Will be replaced with Synchronization::Object in v1.0.'
4043
@condition = ConditionVariable.new
4144
end
4245

lib/concurrent/file_map.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
module Concurrent
22

33
git_files = `git ls-files`.split("\n")
4-
all_lib_files = Dir['lib/concurrent/**/*.rb'] & git_files
4+
all_lib_files = (Dir['lib/concurrent/**/*.rb'] & git_files) - ['lib/concurrent/file_map.rb']
55
edge_lib_files = Dir['lib/concurrent/actor.rb',
66
'lib/concurrent/actor/**/*.rb',
77
'lib/concurrent/channel.rb',
88
'lib/concurrent/channel/**/*.rb',
9+
'lib/concurrent/agent.rb',
10+
'lib/concurrent/exchanger.rb',
11+
'lib/concurrent/lazy_register.rb',
912
'lib/concurrent/edge/**/*.rb'] & git_files
1013
core_lib_files = all_lib_files - edge_lib_files
1114

0 commit comments

Comments
 (0)