concurrent-ruby 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +21 -21
- data/README.md +275 -275
- data/lib/concurrent.rb +28 -28
- data/lib/concurrent/agent.rb +114 -114
- data/lib/concurrent/cached_thread_pool.rb +131 -129
- data/lib/concurrent/defer.rb +65 -65
- data/lib/concurrent/event.rb +60 -60
- data/lib/concurrent/event_machine_defer_proxy.rb +23 -23
- data/lib/concurrent/executor.rb +96 -95
- data/lib/concurrent/fixed_thread_pool.rb +99 -95
- data/lib/concurrent/functions.rb +120 -120
- data/lib/concurrent/future.rb +42 -42
- data/lib/concurrent/global_thread_pool.rb +16 -16
- data/lib/concurrent/goroutine.rb +29 -29
- data/lib/concurrent/null_thread_pool.rb +22 -22
- data/lib/concurrent/obligation.rb +67 -67
- data/lib/concurrent/promise.rb +174 -174
- data/lib/concurrent/reactor.rb +166 -166
- data/lib/concurrent/reactor/drb_async_demux.rb +83 -83
- data/lib/concurrent/reactor/tcp_sync_demux.rb +131 -131
- data/lib/concurrent/supervisor.rb +105 -100
- data/lib/concurrent/thread_pool.rb +76 -76
- data/lib/concurrent/utilities.rb +32 -32
- data/lib/concurrent/version.rb +3 -3
- data/lib/concurrent_ruby.rb +1 -1
- data/md/agent.md +123 -123
- data/md/defer.md +174 -174
- data/md/event.md +32 -32
- data/md/executor.md +187 -187
- data/md/future.md +83 -83
- data/md/goroutine.md +52 -52
- data/md/obligation.md +32 -32
- data/md/promise.md +227 -227
- data/md/thread_pool.md +224 -224
- data/spec/concurrent/agent_spec.rb +386 -386
- data/spec/concurrent/cached_thread_pool_spec.rb +125 -125
- data/spec/concurrent/defer_spec.rb +195 -195
- data/spec/concurrent/event_machine_defer_proxy_spec.rb +256 -256
- data/spec/concurrent/event_spec.rb +134 -134
- data/spec/concurrent/executor_spec.rb +200 -200
- data/spec/concurrent/fixed_thread_pool_spec.rb +83 -83
- data/spec/concurrent/functions_spec.rb +217 -217
- data/spec/concurrent/future_spec.rb +108 -108
- data/spec/concurrent/global_thread_pool_spec.rb +38 -38
- data/spec/concurrent/goroutine_spec.rb +67 -67
- data/spec/concurrent/null_thread_pool_spec.rb +57 -54
- data/spec/concurrent/obligation_shared.rb +132 -132
- data/spec/concurrent/promise_spec.rb +312 -312
- data/spec/concurrent/reactor/drb_async_demux_spec.rb +196 -196
- data/spec/concurrent/reactor/tcp_sync_demux_spec.rb +410 -410
- data/spec/concurrent/reactor_spec.rb +364 -364
- data/spec/concurrent/supervisor_spec.rb +269 -258
- data/spec/concurrent/thread_pool_shared.rb +204 -204
- data/spec/concurrent/utilities_spec.rb +74 -74
- data/spec/spec_helper.rb +32 -32
- metadata +20 -16
- checksums.yaml +0 -7
data/spec/spec_helper.rb
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
require 'simplecov'
|
|
2
|
-
SimpleCov.start do
|
|
3
|
-
project_name 'concurrent-ruby'
|
|
4
|
-
add_filter '/md/'
|
|
5
|
-
add_filter '/pkg/'
|
|
6
|
-
add_filter '/spec/'
|
|
7
|
-
add_filter '/tasks/'
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
require 'eventmachine'
|
|
11
|
-
|
|
12
|
-
require 'concurrent'
|
|
13
|
-
require 'concurrent/functions'
|
|
14
|
-
|
|
15
|
-
require 'functional'
|
|
16
|
-
|
|
17
|
-
# import all the support files
|
|
18
|
-
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require File.expand_path(f) }
|
|
19
|
-
|
|
20
|
-
RSpec.configure do |config|
|
|
21
|
-
config.order = 'random'
|
|
22
|
-
|
|
23
|
-
config.before(:suite) do
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
config.before(:each) do
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
config.after(:each) do
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
end
|
|
1
|
+
require 'simplecov'
|
|
2
|
+
SimpleCov.start do
|
|
3
|
+
project_name 'concurrent-ruby'
|
|
4
|
+
add_filter '/md/'
|
|
5
|
+
add_filter '/pkg/'
|
|
6
|
+
add_filter '/spec/'
|
|
7
|
+
add_filter '/tasks/'
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
require 'eventmachine'
|
|
11
|
+
|
|
12
|
+
require 'concurrent'
|
|
13
|
+
require 'concurrent/functions'
|
|
14
|
+
|
|
15
|
+
require 'functional'
|
|
16
|
+
|
|
17
|
+
# import all the support files
|
|
18
|
+
Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require File.expand_path(f) }
|
|
19
|
+
|
|
20
|
+
RSpec.configure do |config|
|
|
21
|
+
config.order = 'random'
|
|
22
|
+
|
|
23
|
+
config.before(:suite) do
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
config.before(:each) do
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
config.after(:each) do
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
metadata
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: concurrent-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
|
+
prerelease:
|
|
5
6
|
platform: ruby
|
|
6
7
|
authors:
|
|
7
8
|
- Jerry D'Antonio
|
|
8
9
|
autorequire:
|
|
9
10
|
bindir: bin
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date: 2013-08-
|
|
12
|
+
date: 2013-08-20 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
15
|
name: functional-ruby
|
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
|
17
|
+
none: false
|
|
16
18
|
requirements:
|
|
17
19
|
- - ~>
|
|
18
20
|
- !ruby/object:Gem::Version
|
|
@@ -20,6 +22,7 @@ dependencies:
|
|
|
20
22
|
type: :runtime
|
|
21
23
|
prerelease: false
|
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
23
26
|
requirements:
|
|
24
27
|
- - ~>
|
|
25
28
|
- !ruby/object:Gem::Version
|
|
@@ -27,20 +30,22 @@ dependencies:
|
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
|
28
31
|
name: bundler
|
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
|
33
|
+
none: false
|
|
30
34
|
requirements:
|
|
31
|
-
- - '>='
|
|
35
|
+
- - ! '>='
|
|
32
36
|
- !ruby/object:Gem::Version
|
|
33
37
|
version: '0'
|
|
34
38
|
type: :development
|
|
35
39
|
prerelease: false
|
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
|
+
none: false
|
|
37
42
|
requirements:
|
|
38
|
-
- - '>='
|
|
43
|
+
- - ! '>='
|
|
39
44
|
- !ruby/object:Gem::Version
|
|
40
45
|
version: '0'
|
|
41
|
-
description:
|
|
42
|
-
|
|
43
|
-
|
|
46
|
+
description: ! " Modern concurrency tools including agents, futures, promises,
|
|
47
|
+
thread pools, reactors, and more.\n Inspired by Erlang, Clojure, Go, JavaScript,
|
|
48
|
+
actors, and classic concurrency patterns.\n"
|
|
44
49
|
email: jerry.dantonio@gmail.com
|
|
45
50
|
executables: []
|
|
46
51
|
extensions: []
|
|
@@ -106,29 +111,28 @@ files:
|
|
|
106
111
|
homepage: http://www.concurrent-ruby.com
|
|
107
112
|
licenses:
|
|
108
113
|
- MIT
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
future = Concurrent::Future.new{ 'Hello, world!' }
|
|
112
|
-
puts future.value
|
|
113
|
-
#=> Hello, world!
|
|
114
|
+
post_install_message: ! " future = Concurrent::Future.new{ 'Hello, world!' }\n
|
|
115
|
+
\ puts future.value\n #=> Hello, world!\n"
|
|
114
116
|
rdoc_options: []
|
|
115
117
|
require_paths:
|
|
116
118
|
- lib
|
|
117
119
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
|
+
none: false
|
|
118
121
|
requirements:
|
|
119
|
-
- - '>='
|
|
122
|
+
- - ! '>='
|
|
120
123
|
- !ruby/object:Gem::Version
|
|
121
124
|
version: 1.9.2
|
|
122
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
|
+
none: false
|
|
123
127
|
requirements:
|
|
124
|
-
- - '>='
|
|
128
|
+
- - ! '>='
|
|
125
129
|
- !ruby/object:Gem::Version
|
|
126
130
|
version: '0'
|
|
127
131
|
requirements: []
|
|
128
132
|
rubyforge_project:
|
|
129
|
-
rubygems_version:
|
|
133
|
+
rubygems_version: 1.8.24
|
|
130
134
|
signing_key:
|
|
131
|
-
specification_version:
|
|
135
|
+
specification_version: 3
|
|
132
136
|
summary: Modern concurrency tools including agents, futures, promises, thread pools,
|
|
133
137
|
reactors, and more.
|
|
134
138
|
test_files:
|
checksums.yaml
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
SHA1:
|
|
3
|
-
metadata.gz: 336769e53b0dcf7aa0aa3952ca396deaabfd2886
|
|
4
|
-
data.tar.gz: a8f2de814918d3ab9849636741674d9731246c45
|
|
5
|
-
SHA512:
|
|
6
|
-
metadata.gz: 1f6696e6d00cc9126d247673a1f4cd90ec1ef822cd55c2fd30d45bf7b48f766fd6f0a712c884e68c9fe7e29dff005e501ed1299b9903502215f09db1a77dfd83
|
|
7
|
-
data.tar.gz: 5ad2e8367f7bca913db38ecfca31c77288e0029b624587c7196d0658e6d32fe8bb3709b33c7791c95e5c5b5dd494261e0b4130030718e8dbaf2fea9dc65fc5a8
|