concurrent-ruby 0.7.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +21 -0
- data/README.md +217 -0
- data/lib/concurrent.rb +45 -0
- data/lib/concurrent/actor.rb +104 -0
- data/lib/concurrent/actor/behaviour.rb +70 -0
- data/lib/concurrent/actor/behaviour/abstract.rb +48 -0
- data/lib/concurrent/actor/behaviour/awaits.rb +21 -0
- data/lib/concurrent/actor/behaviour/buffer.rb +54 -0
- data/lib/concurrent/actor/behaviour/errors_on_unknown_message.rb +12 -0
- data/lib/concurrent/actor/behaviour/executes_context.rb +18 -0
- data/lib/concurrent/actor/behaviour/linking.rb +42 -0
- data/lib/concurrent/actor/behaviour/pausing.rb +77 -0
- data/lib/concurrent/actor/behaviour/removes_child.rb +16 -0
- data/lib/concurrent/actor/behaviour/sets_results.rb +36 -0
- data/lib/concurrent/actor/behaviour/supervised.rb +58 -0
- data/lib/concurrent/actor/behaviour/supervising.rb +34 -0
- data/lib/concurrent/actor/behaviour/terminates_children.rb +13 -0
- data/lib/concurrent/actor/behaviour/termination.rb +54 -0
- data/lib/concurrent/actor/context.rb +153 -0
- data/lib/concurrent/actor/core.rb +213 -0
- data/lib/concurrent/actor/default_dead_letter_handler.rb +9 -0
- data/lib/concurrent/actor/envelope.rb +41 -0
- data/lib/concurrent/actor/errors.rb +27 -0
- data/lib/concurrent/actor/internal_delegations.rb +49 -0
- data/lib/concurrent/actor/public_delegations.rb +40 -0
- data/lib/concurrent/actor/reference.rb +81 -0
- data/lib/concurrent/actor/root.rb +37 -0
- data/lib/concurrent/actor/type_check.rb +48 -0
- data/lib/concurrent/actor/utils.rb +10 -0
- data/lib/concurrent/actor/utils/ad_hoc.rb +21 -0
- data/lib/concurrent/actor/utils/balancer.rb +40 -0
- data/lib/concurrent/actor/utils/broadcast.rb +52 -0
- data/lib/concurrent/actor/utils/pool.rb +59 -0
- data/lib/concurrent/actress.rb +3 -0
- data/lib/concurrent/agent.rb +230 -0
- data/lib/concurrent/async.rb +284 -0
- data/lib/concurrent/atomic.rb +91 -0
- data/lib/concurrent/atomic/atomic_boolean.rb +202 -0
- data/lib/concurrent/atomic/atomic_fixnum.rb +203 -0
- data/lib/concurrent/atomic/condition.rb +67 -0
- data/lib/concurrent/atomic/copy_on_notify_observer_set.rb +118 -0
- data/lib/concurrent/atomic/copy_on_write_observer_set.rb +117 -0
- data/lib/concurrent/atomic/count_down_latch.rb +116 -0
- data/lib/concurrent/atomic/cyclic_barrier.rb +106 -0
- data/lib/concurrent/atomic/event.rb +98 -0
- data/lib/concurrent/atomic/synchronization.rb +51 -0
- data/lib/concurrent/atomic/thread_local_var.rb +82 -0
- data/lib/concurrent/atomic_reference/concurrent_update_error.rb +8 -0
- data/lib/concurrent/atomic_reference/direct_update.rb +50 -0
- data/lib/concurrent/atomic_reference/jruby.rb +14 -0
- data/lib/concurrent/atomic_reference/mutex_atomic.rb +77 -0
- data/lib/concurrent/atomic_reference/numeric_cas_wrapper.rb +25 -0
- data/lib/concurrent/atomic_reference/rbx.rb +19 -0
- data/lib/concurrent/atomic_reference/ruby.rb +37 -0
- data/lib/concurrent/atomics.rb +11 -0
- data/lib/concurrent/channel/buffered_channel.rb +85 -0
- data/lib/concurrent/channel/channel.rb +41 -0
- data/lib/concurrent/channel/unbuffered_channel.rb +35 -0
- data/lib/concurrent/channel/waitable_list.rb +40 -0
- data/lib/concurrent/channels.rb +5 -0
- data/lib/concurrent/collection/blocking_ring_buffer.rb +71 -0
- data/lib/concurrent/collection/priority_queue.rb +305 -0
- data/lib/concurrent/collection/ring_buffer.rb +59 -0
- data/lib/concurrent/collections.rb +3 -0
- data/lib/concurrent/configuration.rb +161 -0
- data/lib/concurrent/dataflow.rb +108 -0
- data/lib/concurrent/delay.rb +104 -0
- data/lib/concurrent/dereferenceable.rb +101 -0
- data/lib/concurrent/errors.rb +30 -0
- data/lib/concurrent/exchanger.rb +34 -0
- data/lib/concurrent/executor/cached_thread_pool.rb +44 -0
- data/lib/concurrent/executor/executor.rb +282 -0
- data/lib/concurrent/executor/fixed_thread_pool.rb +33 -0
- data/lib/concurrent/executor/immediate_executor.rb +65 -0
- data/lib/concurrent/executor/java_cached_thread_pool.rb +31 -0
- data/lib/concurrent/executor/java_fixed_thread_pool.rb +41 -0
- data/lib/concurrent/executor/java_single_thread_executor.rb +22 -0
- data/lib/concurrent/executor/java_thread_pool_executor.rb +180 -0
- data/lib/concurrent/executor/per_thread_executor.rb +100 -0
- data/lib/concurrent/executor/ruby_cached_thread_pool.rb +29 -0
- data/lib/concurrent/executor/ruby_fixed_thread_pool.rb +32 -0
- data/lib/concurrent/executor/ruby_single_thread_executor.rb +74 -0
- data/lib/concurrent/executor/ruby_thread_pool_executor.rb +288 -0
- data/lib/concurrent/executor/ruby_thread_pool_worker.rb +72 -0
- data/lib/concurrent/executor/safe_task_executor.rb +35 -0
- data/lib/concurrent/executor/serialized_execution.rb +126 -0
- data/lib/concurrent/executor/single_thread_executor.rb +35 -0
- data/lib/concurrent/executor/thread_pool_executor.rb +68 -0
- data/lib/concurrent/executor/timer_set.rb +143 -0
- data/lib/concurrent/executors.rb +9 -0
- data/lib/concurrent/future.rb +125 -0
- data/lib/concurrent/ivar.rb +111 -0
- data/lib/concurrent/lazy_register.rb +58 -0
- data/lib/concurrent/logging.rb +17 -0
- data/lib/concurrent/mvar.rb +200 -0
- data/lib/concurrent/obligation.rb +171 -0
- data/lib/concurrent/observable.rb +40 -0
- data/lib/concurrent/options_parser.rb +48 -0
- data/lib/concurrent/promise.rb +170 -0
- data/lib/concurrent/scheduled_task.rb +79 -0
- data/lib/concurrent/timer_task.rb +341 -0
- data/lib/concurrent/tvar.rb +248 -0
- data/lib/concurrent/utilities.rb +3 -0
- data/lib/concurrent/utility/processor_count.rb +152 -0
- data/lib/concurrent/utility/timeout.rb +35 -0
- data/lib/concurrent/utility/timer.rb +21 -0
- data/lib/concurrent/version.rb +3 -0
- data/lib/concurrent_ruby.rb +1 -0
- data/lib/concurrent_ruby_ext.jar +0 -0
- data/lib/concurrent_ruby_ext.so +0 -0
- data/lib/extension_helper.rb +28 -0
- metadata +163 -0
@@ -0,0 +1 @@
|
|
1
|
+
require 'concurrent'
|
Binary file
|
Binary file
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Concurrent
|
2
|
+
|
3
|
+
# @!visibility private
|
4
|
+
def self.allow_c_extensions?
|
5
|
+
defined?(RUBY_ENGINE) && RUBY_ENGINE == 'ruby'
|
6
|
+
end
|
7
|
+
|
8
|
+
# @!visibility private
|
9
|
+
def self.allow_c_native_class?(clazz)
|
10
|
+
allow_c_extensions? && Concurrent.const_defined?(clazz)
|
11
|
+
rescue
|
12
|
+
false
|
13
|
+
end
|
14
|
+
|
15
|
+
# @!visibility private
|
16
|
+
def self.safe_require_c_extensions
|
17
|
+
require 'concurrent_ruby_ext' if allow_c_extensions?
|
18
|
+
rescue LoadError
|
19
|
+
#warn 'Attempted to load C extensions on unsupported platform. Continuing with pure-Ruby.'
|
20
|
+
end
|
21
|
+
|
22
|
+
# @!visibility private
|
23
|
+
def self.safe_require_java_extensions
|
24
|
+
require 'concurrent_ruby_ext' if RUBY_PLATFORM == 'java'
|
25
|
+
rescue LoadError
|
26
|
+
#warn 'Attempted to load Java extensions on unsupported platform. Continuing with pure-Ruby.'
|
27
|
+
end
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: concurrent-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.7.0
|
5
|
+
prerelease:
|
6
|
+
platform: java
|
7
|
+
authors:
|
8
|
+
- Jerry D'Antonio
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2014-08-13 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: |2
|
15
|
+
Modern concurrency tools including agents, futures, promises, thread pools, actors, supervisors, and more.
|
16
|
+
Inspired by Erlang, Clojure, Go, JavaScript, actors, and classic concurrency patterns.
|
17
|
+
email: jerry.dantonio@gmail.com
|
18
|
+
executables: []
|
19
|
+
extensions: []
|
20
|
+
extra_rdoc_files:
|
21
|
+
- README.md
|
22
|
+
- LICENSE.txt
|
23
|
+
files:
|
24
|
+
- lib/concurrent.rb
|
25
|
+
- lib/concurrent_ruby.rb
|
26
|
+
- lib/concurrent_ruby_ext.so
|
27
|
+
- lib/extension_helper.rb
|
28
|
+
- lib/concurrent/actor.rb
|
29
|
+
- lib/concurrent/actress.rb
|
30
|
+
- lib/concurrent/agent.rb
|
31
|
+
- lib/concurrent/async.rb
|
32
|
+
- lib/concurrent/atomic.rb
|
33
|
+
- lib/concurrent/atomics.rb
|
34
|
+
- lib/concurrent/channels.rb
|
35
|
+
- lib/concurrent/collections.rb
|
36
|
+
- lib/concurrent/configuration.rb
|
37
|
+
- lib/concurrent/dataflow.rb
|
38
|
+
- lib/concurrent/delay.rb
|
39
|
+
- lib/concurrent/dereferenceable.rb
|
40
|
+
- lib/concurrent/errors.rb
|
41
|
+
- lib/concurrent/exchanger.rb
|
42
|
+
- lib/concurrent/executors.rb
|
43
|
+
- lib/concurrent/future.rb
|
44
|
+
- lib/concurrent/ivar.rb
|
45
|
+
- lib/concurrent/lazy_register.rb
|
46
|
+
- lib/concurrent/logging.rb
|
47
|
+
- lib/concurrent/mvar.rb
|
48
|
+
- lib/concurrent/obligation.rb
|
49
|
+
- lib/concurrent/observable.rb
|
50
|
+
- lib/concurrent/options_parser.rb
|
51
|
+
- lib/concurrent/promise.rb
|
52
|
+
- lib/concurrent/scheduled_task.rb
|
53
|
+
- lib/concurrent/timer_task.rb
|
54
|
+
- lib/concurrent/tvar.rb
|
55
|
+
- lib/concurrent/utilities.rb
|
56
|
+
- lib/concurrent/version.rb
|
57
|
+
- lib/concurrent/actor/behaviour.rb
|
58
|
+
- lib/concurrent/actor/context.rb
|
59
|
+
- lib/concurrent/actor/core.rb
|
60
|
+
- lib/concurrent/actor/default_dead_letter_handler.rb
|
61
|
+
- lib/concurrent/actor/envelope.rb
|
62
|
+
- lib/concurrent/actor/errors.rb
|
63
|
+
- lib/concurrent/actor/internal_delegations.rb
|
64
|
+
- lib/concurrent/actor/public_delegations.rb
|
65
|
+
- lib/concurrent/actor/reference.rb
|
66
|
+
- lib/concurrent/actor/root.rb
|
67
|
+
- lib/concurrent/actor/type_check.rb
|
68
|
+
- lib/concurrent/actor/utils.rb
|
69
|
+
- lib/concurrent/actor/behaviour/abstract.rb
|
70
|
+
- lib/concurrent/actor/behaviour/awaits.rb
|
71
|
+
- lib/concurrent/actor/behaviour/buffer.rb
|
72
|
+
- lib/concurrent/actor/behaviour/errors_on_unknown_message.rb
|
73
|
+
- lib/concurrent/actor/behaviour/executes_context.rb
|
74
|
+
- lib/concurrent/actor/behaviour/linking.rb
|
75
|
+
- lib/concurrent/actor/behaviour/pausing.rb
|
76
|
+
- lib/concurrent/actor/behaviour/removes_child.rb
|
77
|
+
- lib/concurrent/actor/behaviour/sets_results.rb
|
78
|
+
- lib/concurrent/actor/behaviour/supervised.rb
|
79
|
+
- lib/concurrent/actor/behaviour/supervising.rb
|
80
|
+
- lib/concurrent/actor/behaviour/terminates_children.rb
|
81
|
+
- lib/concurrent/actor/behaviour/termination.rb
|
82
|
+
- lib/concurrent/actor/utils/ad_hoc.rb
|
83
|
+
- lib/concurrent/actor/utils/balancer.rb
|
84
|
+
- lib/concurrent/actor/utils/broadcast.rb
|
85
|
+
- lib/concurrent/actor/utils/pool.rb
|
86
|
+
- lib/concurrent/atomic/atomic_boolean.rb
|
87
|
+
- lib/concurrent/atomic/atomic_fixnum.rb
|
88
|
+
- lib/concurrent/atomic/condition.rb
|
89
|
+
- lib/concurrent/atomic/copy_on_notify_observer_set.rb
|
90
|
+
- lib/concurrent/atomic/copy_on_write_observer_set.rb
|
91
|
+
- lib/concurrent/atomic/count_down_latch.rb
|
92
|
+
- lib/concurrent/atomic/cyclic_barrier.rb
|
93
|
+
- lib/concurrent/atomic/event.rb
|
94
|
+
- lib/concurrent/atomic/synchronization.rb
|
95
|
+
- lib/concurrent/atomic/thread_local_var.rb
|
96
|
+
- lib/concurrent/atomic_reference/concurrent_update_error.rb
|
97
|
+
- lib/concurrent/atomic_reference/direct_update.rb
|
98
|
+
- lib/concurrent/atomic_reference/jruby.rb
|
99
|
+
- lib/concurrent/atomic_reference/mutex_atomic.rb
|
100
|
+
- lib/concurrent/atomic_reference/numeric_cas_wrapper.rb
|
101
|
+
- lib/concurrent/atomic_reference/rbx.rb
|
102
|
+
- lib/concurrent/atomic_reference/ruby.rb
|
103
|
+
- lib/concurrent/channel/buffered_channel.rb
|
104
|
+
- lib/concurrent/channel/channel.rb
|
105
|
+
- lib/concurrent/channel/unbuffered_channel.rb
|
106
|
+
- lib/concurrent/channel/waitable_list.rb
|
107
|
+
- lib/concurrent/collection/blocking_ring_buffer.rb
|
108
|
+
- lib/concurrent/collection/priority_queue.rb
|
109
|
+
- lib/concurrent/collection/ring_buffer.rb
|
110
|
+
- lib/concurrent/executor/cached_thread_pool.rb
|
111
|
+
- lib/concurrent/executor/executor.rb
|
112
|
+
- lib/concurrent/executor/fixed_thread_pool.rb
|
113
|
+
- lib/concurrent/executor/immediate_executor.rb
|
114
|
+
- lib/concurrent/executor/java_cached_thread_pool.rb
|
115
|
+
- lib/concurrent/executor/java_fixed_thread_pool.rb
|
116
|
+
- lib/concurrent/executor/java_single_thread_executor.rb
|
117
|
+
- lib/concurrent/executor/java_thread_pool_executor.rb
|
118
|
+
- lib/concurrent/executor/per_thread_executor.rb
|
119
|
+
- lib/concurrent/executor/ruby_cached_thread_pool.rb
|
120
|
+
- lib/concurrent/executor/ruby_fixed_thread_pool.rb
|
121
|
+
- lib/concurrent/executor/ruby_single_thread_executor.rb
|
122
|
+
- lib/concurrent/executor/ruby_thread_pool_executor.rb
|
123
|
+
- lib/concurrent/executor/ruby_thread_pool_worker.rb
|
124
|
+
- lib/concurrent/executor/safe_task_executor.rb
|
125
|
+
- lib/concurrent/executor/serialized_execution.rb
|
126
|
+
- lib/concurrent/executor/single_thread_executor.rb
|
127
|
+
- lib/concurrent/executor/thread_pool_executor.rb
|
128
|
+
- lib/concurrent/executor/timer_set.rb
|
129
|
+
- lib/concurrent/utility/processor_count.rb
|
130
|
+
- lib/concurrent/utility/timeout.rb
|
131
|
+
- lib/concurrent/utility/timer.rb
|
132
|
+
- README.md
|
133
|
+
- LICENSE.txt
|
134
|
+
- lib/concurrent_ruby_ext.jar
|
135
|
+
homepage: http://www.concurrent-ruby.com
|
136
|
+
licenses:
|
137
|
+
- MIT
|
138
|
+
post_install_message:
|
139
|
+
rdoc_options: []
|
140
|
+
require_paths:
|
141
|
+
- lib
|
142
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - '>='
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: 1.9.3
|
147
|
+
none: false
|
148
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
hash: 2
|
154
|
+
segments:
|
155
|
+
- 0
|
156
|
+
none: false
|
157
|
+
requirements: []
|
158
|
+
rubyforge_project:
|
159
|
+
rubygems_version: 1.8.25
|
160
|
+
signing_key:
|
161
|
+
specification_version: 3
|
162
|
+
summary: Modern concurrency tools for Ruby. Inspired by Erlang, Clojure, Scala, Haskell, F#, C#, Java, and classic concurrency patterns.
|
163
|
+
test_files: []
|