celluloid 0.16.0 → 0.17.3

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.
Files changed (177) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +394 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +28 -15
  5. data/culture/CONDUCT.md +28 -0
  6. data/culture/Gemfile +9 -0
  7. data/culture/LICENSE.txt +22 -0
  8. data/culture/README.md +22 -0
  9. data/culture/Rakefile +5 -0
  10. data/culture/SYNC.md +70 -0
  11. data/culture/celluloid-culture.gemspec +18 -0
  12. data/culture/gems/README.md +39 -0
  13. data/culture/gems/dependencies.yml +85 -0
  14. data/culture/gems/loader.rb +101 -0
  15. data/culture/rubocop/README.md +38 -0
  16. data/culture/rubocop/lint.yml +8 -0
  17. data/culture/rubocop/metrics.yml +15 -0
  18. data/culture/rubocop/perf.yml +0 -0
  19. data/culture/rubocop/rubocop.yml +5 -0
  20. data/culture/rubocop/style.yml +57 -0
  21. data/culture/spec/gems_spec.rb +2 -0
  22. data/culture/spec/spec_helper.rb +0 -0
  23. data/culture/spec/sync_spec.rb +2 -0
  24. data/culture/sync.rb +56 -0
  25. data/culture/tasks/rspec.rake +5 -0
  26. data/culture/tasks/rubocop.rake +2 -0
  27. data/examples/basic_usage.rb +49 -0
  28. data/examples/futures.rb +38 -0
  29. data/examples/ring.rb +61 -0
  30. data/examples/simple_pmap.rb +14 -0
  31. data/examples/stack.rb +47 -0
  32. data/examples/timers.rb +72 -0
  33. data/lib/celluloid/actor/manager.rb +7 -0
  34. data/lib/celluloid/actor/system.rb +163 -0
  35. data/lib/celluloid/actor.rb +53 -71
  36. data/lib/celluloid/autostart.rb +1 -1
  37. data/lib/celluloid/backported.rb +2 -0
  38. data/lib/celluloid/call/async.rb +16 -0
  39. data/lib/celluloid/call/block.rb +22 -0
  40. data/lib/celluloid/call/sync.rb +70 -0
  41. data/lib/celluloid/calls.rb +24 -114
  42. data/lib/celluloid/cell.rb +32 -20
  43. data/lib/celluloid/condition.rb +5 -6
  44. data/lib/celluloid/core_ext.rb +1 -1
  45. data/lib/celluloid/current.rb +2 -0
  46. data/lib/celluloid/debug.rb +1 -0
  47. data/lib/celluloid/deprecate.rb +21 -0
  48. data/lib/celluloid/exceptions.rb +22 -16
  49. data/lib/celluloid/fiber.rb +3 -3
  50. data/lib/celluloid/future.rb +46 -8
  51. data/lib/celluloid/group/pool.rb +125 -0
  52. data/lib/celluloid/group/spawner.rb +68 -0
  53. data/lib/celluloid/group.rb +61 -0
  54. data/lib/celluloid/logging.rb +5 -5
  55. data/lib/celluloid/mailbox/evented.rb +74 -0
  56. data/lib/celluloid/mailbox.rb +15 -14
  57. data/lib/celluloid/managed.rb +3 -0
  58. data/lib/celluloid/notices.rb +15 -0
  59. data/lib/celluloid/proxies.rb +11 -0
  60. data/lib/celluloid/proxy/abstract.rb +50 -0
  61. data/lib/celluloid/proxy/actor.rb +37 -0
  62. data/lib/celluloid/proxy/async.rb +15 -0
  63. data/lib/celluloid/proxy/block.rb +28 -0
  64. data/lib/celluloid/proxy/cell.rb +66 -0
  65. data/lib/celluloid/proxy/future.rb +20 -0
  66. data/lib/celluloid/proxy/sync.rb +24 -0
  67. data/lib/celluloid/rspec.rb +67 -9
  68. data/lib/celluloid/system_events.rb +69 -14
  69. data/lib/celluloid/task/fibered.rb +45 -0
  70. data/lib/celluloid/task/threaded.rb +59 -0
  71. data/lib/celluloid/{tasks.rb → task.rb} +30 -38
  72. data/lib/celluloid/test.rb +1 -1
  73. data/lib/celluloid/thread.rb +6 -1
  74. data/lib/celluloid/version.rb +3 -0
  75. data/lib/celluloid.rb +151 -130
  76. data/spec/celluloid/actor/system_spec.rb +83 -0
  77. data/spec/celluloid/actor_spec.rb +2 -2
  78. data/spec/celluloid/block_spec.rb +67 -8
  79. data/spec/celluloid/calls_spec.rb +28 -23
  80. data/spec/celluloid/condition_spec.rb +23 -14
  81. data/spec/celluloid/evented_mailbox_spec.rb +1 -31
  82. data/spec/celluloid/future_spec.rb +15 -12
  83. data/spec/celluloid/group/elastic_spec.rb +0 -0
  84. data/spec/celluloid/group/pool_spec.rb +8 -0
  85. data/spec/celluloid/group/spawner_spec.rb +17 -0
  86. data/spec/celluloid/mailbox/evented_spec.rb +40 -0
  87. data/spec/celluloid/mailbox_spec.rb +1 -3
  88. data/spec/celluloid/misc/leak_spec.rb +73 -0
  89. data/spec/celluloid/proxy_spec.rb +33 -0
  90. data/spec/celluloid/task/fibered_spec.rb +5 -0
  91. data/spec/celluloid/task/threaded_spec.rb +5 -0
  92. data/spec/celluloid/timer_spec.rb +14 -16
  93. data/spec/deprecate/actor_system_spec.rb +72 -0
  94. data/spec/deprecate/block_spec.rb +52 -0
  95. data/spec/deprecate/calls_spec.rb +39 -0
  96. data/spec/deprecate/evented_mailbox_spec.rb +34 -0
  97. data/spec/deprecate/future_spec.rb +32 -0
  98. data/spec/deprecate/internal_pool_spec.rb +4 -0
  99. data/spec/shared/actor_examples.rb +1259 -0
  100. data/spec/shared/group_examples.rb +121 -0
  101. data/spec/shared/mailbox_examples.rb +87 -0
  102. data/{lib/celluloid/rspec → spec/shared}/task_examples.rb +9 -8
  103. data/spec/spec_helper.rb +5 -42
  104. data/spec/support/configure_rspec.rb +77 -0
  105. data/spec/support/coverage.rb +4 -0
  106. data/spec/support/crash_checking.rb +68 -0
  107. data/spec/support/debugging.rb +31 -0
  108. data/spec/support/env.rb +21 -0
  109. data/{lib/celluloid/rspec/example_actor_class.rb → spec/support/examples/actor_class.rb} +21 -2
  110. data/spec/support/examples/call_class.rb +37 -0
  111. data/spec/support/examples/evented_mailbox_class.rb +27 -0
  112. data/spec/support/includer.rb +6 -0
  113. data/spec/support/logging.rb +55 -0
  114. data/spec/support/loose_threads.rb +68 -0
  115. data/spec/support/reset_class_variables.rb +27 -0
  116. data/spec/support/sleep_and_wait.rb +14 -0
  117. data/spec/support/stubbing.rb +14 -0
  118. metadata +276 -78
  119. data/lib/celluloid/actor_system.rb +0 -107
  120. data/lib/celluloid/call_chain.rb +0 -13
  121. data/lib/celluloid/cpu_counter.rb +0 -34
  122. data/lib/celluloid/evented_mailbox.rb +0 -73
  123. data/lib/celluloid/fsm.rb +0 -186
  124. data/lib/celluloid/handlers.rb +0 -41
  125. data/lib/celluloid/internal_pool.rb +0 -159
  126. data/lib/celluloid/legacy.rb +0 -9
  127. data/lib/celluloid/links.rb +0 -36
  128. data/lib/celluloid/logger.rb +0 -93
  129. data/lib/celluloid/logging/incident.rb +0 -21
  130. data/lib/celluloid/logging/incident_logger.rb +0 -129
  131. data/lib/celluloid/logging/incident_reporter.rb +0 -48
  132. data/lib/celluloid/logging/log_event.rb +0 -20
  133. data/lib/celluloid/logging/ring_buffer.rb +0 -65
  134. data/lib/celluloid/method.rb +0 -32
  135. data/lib/celluloid/notifications.rb +0 -83
  136. data/lib/celluloid/pool_manager.rb +0 -146
  137. data/lib/celluloid/probe.rb +0 -73
  138. data/lib/celluloid/properties.rb +0 -24
  139. data/lib/celluloid/proxies/abstract_proxy.rb +0 -20
  140. data/lib/celluloid/proxies/actor_proxy.rb +0 -38
  141. data/lib/celluloid/proxies/async_proxy.rb +0 -31
  142. data/lib/celluloid/proxies/block_proxy.rb +0 -29
  143. data/lib/celluloid/proxies/cell_proxy.rb +0 -68
  144. data/lib/celluloid/proxies/future_proxy.rb +0 -35
  145. data/lib/celluloid/proxies/sync_proxy.rb +0 -36
  146. data/lib/celluloid/receivers.rb +0 -63
  147. data/lib/celluloid/registry.rb +0 -57
  148. data/lib/celluloid/responses.rb +0 -44
  149. data/lib/celluloid/rspec/actor_examples.rb +0 -1054
  150. data/lib/celluloid/rspec/mailbox_examples.rb +0 -84
  151. data/lib/celluloid/signals.rb +0 -23
  152. data/lib/celluloid/stack_dump.rb +0 -133
  153. data/lib/celluloid/supervision_group.rb +0 -169
  154. data/lib/celluloid/supervisor.rb +0 -22
  155. data/lib/celluloid/task_set.rb +0 -49
  156. data/lib/celluloid/tasks/task_fiber.rb +0 -43
  157. data/lib/celluloid/tasks/task_thread.rb +0 -53
  158. data/lib/celluloid/thread_handle.rb +0 -50
  159. data/lib/celluloid/uuid.rb +0 -38
  160. data/spec/celluloid/actor_system_spec.rb +0 -69
  161. data/spec/celluloid/cpu_counter_spec.rb +0 -82
  162. data/spec/celluloid/fsm_spec.rb +0 -107
  163. data/spec/celluloid/internal_pool_spec.rb +0 -52
  164. data/spec/celluloid/links_spec.rb +0 -45
  165. data/spec/celluloid/logging/ring_buffer_spec.rb +0 -38
  166. data/spec/celluloid/notifications_spec.rb +0 -120
  167. data/spec/celluloid/pool_spec.rb +0 -92
  168. data/spec/celluloid/probe_spec.rb +0 -121
  169. data/spec/celluloid/properties_spec.rb +0 -42
  170. data/spec/celluloid/registry_spec.rb +0 -64
  171. data/spec/celluloid/stack_dump_spec.rb +0 -64
  172. data/spec/celluloid/supervision_group_spec.rb +0 -65
  173. data/spec/celluloid/supervisor_spec.rb +0 -103
  174. data/spec/celluloid/tasks/task_fiber_spec.rb +0 -5
  175. data/spec/celluloid/tasks/task_thread_spec.rb +0 -5
  176. data/spec/celluloid/thread_handle_spec.rb +0 -26
  177. data/spec/celluloid/uuid_spec.rb +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6b9e9584ba72b44bbb2ce23372b0b4b86f2f3687
4
- data.tar.gz: 10ec35b6465a1025defe4a697c3108f1982b5f77
3
+ metadata.gz: eff22fc2c5057bb33885344388462730338e2b5c
4
+ data.tar.gz: 45dab801f10eb84efedd3734f60a7e600bf77618
5
5
  SHA512:
6
- metadata.gz: 9394c33b6d7eff1efa0e0f78d24ff5578ce208dac695d0b7b806c999b47a456253c670783599ae448cb9bb3f6bf455be4ac66705fb399d8e53c3adb72a894250
7
- data.tar.gz: f3e2659328cb38517ec107ad32e7c08d8aaa40fece3d74213273d50f703a6cb0878a43616d933b41fb6d061d928f02ba68850d269be32107062bc5e7b162bcc2
6
+ metadata.gz: 8d99c5e87c151a511a52c7b159cbd2b07ec2d898027aba8573260db4ead19381bfa629bff6ee8b3cc5a2537bef8cab3f626c42798d68717a35a7f8d3e8644767
7
+ data.tar.gz: 03231c9ab4686ef1812ef88a7a44e51029db1c30743622e5dbbbc38eb6cb7db1f917942df887d57006e772a8936a8ae1cbe0f6fc8e29603f2dc979a97b584d9f
data/CHANGES.md ADDED
@@ -0,0 +1,394 @@
1
+ 0.17.3 (2016-01-18)
2
+ -----
3
+ * [#701](https://github.com/celluloid/celluloid/pull/701)
4
+ Conditions in loose threads loop does not take into account the difference between
5
+ backtraces from ruby 2.0.0 and greater than. Fixes celluloid/celluloid-io#165.
6
+ ([@TiagoCardoso1983])
7
+
8
+ * [#700](https://github.com/celluloid/celluloid/pull/700)
9
+ Set celluloid logger level to info by default unless debug is enabled. Fixes #667.
10
+ ([@ioquatix])
11
+
12
+ * [#695](https://github.com/celluloid/celluloid/pull/695)
13
+ Extending the condition event handler with the block; this solves a bug
14
+ introduced in jruby >9.0.0.0, which breaks with an ArgumentError exception,
15
+ apparently due to the way to_proc procs are passed arguments. Fixes #694.
16
+ ([@TiagoCardoso1983])
17
+
18
+ * [#689](https://github.com/celluloid/celluloid/pull/689)
19
+ Simplified sync, async and future proxies by providing specific AbstractCall base.
20
+ ([@ioquatix])
21
+
22
+ * [#688](https://github.com/celluloid/celluloid/pull/688)
23
+ Fix failure to remove dead actors from sets, e.g. celluloid-supervision.
24
+ ([@ioquatix])
25
+
26
+ * [#686](https://github.com/celluloid/celluloid/pull/686)
27
+ Print out method name to help debugging method call which caused dead actor error.
28
+ ([@ioquatix])
29
+
30
+ * [#682](https://github.com/celluloid/celluloid/pull/682)
31
+ Remove excess call/block require.
32
+
33
+ * [#666](https://github.com/celluloid/celluloid/pull/666)
34
+ Don't catch IOError.
35
+
36
+ 0.17.2 (2015-09-30)
37
+ -----
38
+ * Revamped test suite, using shared RSpec configuration layer provided by Celluloid itself.
39
+ * Updated gem dependencies provided by Celluloid::Sync... extraneous gems removed, or marked as development dependencies.
40
+ * Clean up deprecation notes.
41
+
42
+ 0.17.1.2 (2015-08-21)
43
+ -----
44
+ * Fixes to posted markdown content.
45
+ * Pull in new gem dependencies.
46
+
47
+ 0.17.1.1 (2015-08-07)
48
+ -----
49
+ * Revert "no task to suspend" code from #232.
50
+
51
+ 0.17.1 (2015-08-06)
52
+ -----
53
+ * `Celluloid::ActorSystem` moved to `Celluloid::Actor::System`, and from `celluloid/actor_system.rb` to `celluloid/actor/system.rb`
54
+ * Added extensible API for defining new SystemEvents, and having them handled... without everyone changing `Actor#handle_system_event`.
55
+ * Deprecated Task::TerminatedError & Task::TimeoutError... Consolidated in exceptions.rb, inherited from Exceptions vs. StandardError.
56
+ * General round-up of all "errors" emitted throughout Celluloid, to either be derived from `Celluloid::Error` or `Celluloid::Interruption`.
57
+ * Added ability to pass a block to `Condition#wait` which runs a `{ |value| ... }` type block if present, once the value is obtained by waiting.
58
+
59
+ 0.17.0 (2015-07-04)
60
+ -----
61
+ * Fix $CELLULOID_TEST warnings
62
+ * Massive overhaul of test suite, end-to-end.
63
+ * Make "Terminating task" log messages debug-level events
64
+ * Added `.dead?` method on actors, as opposite of `.alive?`
65
+ * Added class/module method to access `publish` outside actors.
66
+ * Radical Refactor of Celluloid::InternalPool, and moved it to Celluloid::Group::Pool
67
+ * Radical Refactor: *::Group::Pool replaced as default with *::Group::Spawner
68
+ * Added `rspec-log_split` as replacement logger for itemized testing logs.
69
+ * *::Task::PooledFibers has been found and made available, and compatible ( sometimes 4x faster than even Task::Fibered )
70
+ * GEM EXTRACTION: PoolManager taken out, and implemented in the `celluloid-pool` gem, separately.
71
+ * GEM EXTRACTION: FSM taken out, and implemented in the `celluloid-fsm` gem, separately.
72
+ * GEM EXTRACTION: SupervisionGroup, Supervisor, and related methods taken out, and implemented in the `celluloid-supervision` gem, separately.
73
+ * BREAKING CHANGE: Added Celluloid::Internals and moved several "private" classes into that namespace:
74
+ * CallChain, CPUCounter, Handlers ( and Handle ), Links, Logger, Method, Properties, Registry, Responses, Signals, StackDump, TaskSet, ThreadHandle, UUID.
75
+ * BREAKING CHANGE: Changed class names, per convention:
76
+ * Moved Celluloid::TaskFiber to Celluloid::Task::Fibered
77
+ * Moved Celluloid::TaskThread to Celluloid::Task::Threaded
78
+ * Moved Celluloid::EventedMailbox to Celluloid::Mailbox::Evented
79
+ * Moved Celluloid::AbstractProxy to Celluloid::Proxy::Abstract
80
+ * Moved Celluloid::ActorProxy to Celluloid::Proxy::Actor
81
+ * Moved Celluloid::AsyncProxy to Celluloid::Proxy::Async
82
+ * Moved Celluloid::BlockProxy to Celluloid::Proxy::Block
83
+ * Moved Celluloid::CellProxy to Celluloid::Proxy::Cell
84
+ * Moved Celluloid::FutureProxy to Celluloid::Proxy::Future
85
+ * Moved Celluloid::SyncProxy to Celluloid::Proxy::Sync
86
+ * GEM EXTRACTION: `Internals`, `Notifications`, `Probe`, and the contents of `logging/*` have become a `celluloid-essentials` gem.
87
+ * Implement `Group::Manager` as base for future `Group::Unlocker` and other such systems traversing `ActorSystem#group` regularly.
88
+ * Reduce number of supervisors instantiated by `ActorSystem` by consolidating them down to `Service::Root` container instances.
89
+
90
+ 0.16.0 (2014-09-04)
91
+ -----
92
+ * Factor apart Celluloid::Cell (concurrent objects) from Celluloid::Actor
93
+ * Introduce Celluloid::ActorSystem as an abstraction around the backend
94
+ actor implementation (idea borrowed from Akka)
95
+ * Celluloid::Probe system for monitoring system behavior
96
+ * Fix handling of timeouts with Celluloid::EventedMailbox (i.e. Celluloid::IO
97
+ and Celluloid::ZMQ)
98
+ * Add timeout support to Celluloid::Condition
99
+ * Obtain actor names via Celluloid::Actor.registered_name and
100
+ #registered_name to avoid conflicts with the built-in Ruby
101
+ Class.name method
102
+ * Update to timers 4.0.0
103
+ * Dynamically resizable pools
104
+ * Remove use of core Ruby ThreadGroups
105
+ * Simplified CPU core detector
106
+ * Better thread names on JRuby for easier debugging
107
+ * Thread safety fixes to internal thread pool
108
+
109
+ 0.15.2 (2013-10-06)
110
+ -----
111
+ * require 'celluloid/test' for at_exit-free testing
112
+
113
+ 0.15.1 (2013-09-06)
114
+ -----
115
+ * Only raise on nested tasks if $CELLULOID_DEBUG is set
116
+
117
+ 0.15.0 (2013-09-04)
118
+ -----
119
+ * Remove legacy support for "bang"-method based async invocation
120
+ * Generic timeout support with Celluloid#timeout
121
+ * Implement recursion detection for #inspect, avoiding infinite loop bugs
122
+ * Fix various inheritance anomalies in class attributes (e.g. mailbox_class)
123
+ * Avoid letting version.rb define an unusable Celluloid module
124
+ * Remove "Shutdown completed cleanly" message that was annoying everyone
125
+ * Subclass all Celluloid exceptions from Celluloid::Error
126
+ * Log all unhandled messages
127
+ * Celluloid::Conditions are now usable ubiquitously, not just inside actors
128
+ * Introspection support for number of threads in the Celluloid thread pool
129
+ * Use a ThreadGroup to track the threads in the Celluloid thread pool
130
+ * Reimplement signal system on top of Conditions
131
+ * Add metadata like the current method to Celluloid::StackDumps
132
+
133
+ 0.14.0 (2013-05-07)
134
+ -----
135
+ * Use a Thread-subclass for Celluloid
136
+ * Implement actor-local variables
137
+ * Add helper methods to the class
138
+ * Move IO::Mailbox to EventedMailbox to remove dependency between
139
+ celluloid-io and celluloid-zmq. This makes it easier to maintain
140
+ the evented style of Mailbox.
141
+ * Install the `at_exit` handler by default
142
+ * Show backtrace for all tasks. Currently only for TaskThread
143
+ * Implement mailbox bounds where overflow is logged
144
+ * Fix Thread self-join
145
+ * Execute blocks on the sender by default
146
+ * Fix CPU counter on windows
147
+
148
+ 0.13.0
149
+ -----
150
+ * API change: Require Celluloid with: require 'celluloid/autostart' to
151
+ automatically start support actors and configure at_exit handler which
152
+ automatically terminates all actors.
153
+ * API change: use_mailbox has been removed
154
+ * API change: finalizers must be declared with "finalizer :my_finalizer"
155
+ * Bugfix: receivers don't crash when methods are called incorrectly
156
+ * Celluloid::Condition provides ConditionVariable-like signaling
157
+ * Shutdown timeout reduced to 10 seconds
158
+ * Stack traces across inter-actor calls! Should make Celluloid backtraces
159
+ much easier to understand
160
+ * Celluloid#call_chain_id provides UUIDs for calls across actors
161
+ * Give all thread locals a :celluloid_* prefix
162
+
163
+ 0.12.4
164
+ -----
165
+ * Bugfix: Clear dead/crashed actors out of links
166
+ * Bugfix: Exclusive mode was broken
167
+ * Bugfix: Celluloid::SupervisionGroup#run was broken
168
+ * Celluloid::ClassMethods#proxy_class allows configurable proxies
169
+ * Improved error messages for Fiber-related problems
170
+ * Better object leakage detection when inspecting
171
+ * Use #public_send to dispatch Celluloid methods
172
+ * #idle_size and #busy_size for Celluloid::PoolManager
173
+
174
+ 0.12.3
175
+ -----
176
+ * Bugfix: Ensure exclusive mode works correctly for per-method case
177
+ * Bugfix: Exit handlers were not being inherited correctly
178
+
179
+ 0.12.2
180
+ -----
181
+ * Disable IncidentReporter by default
182
+
183
+ 0.12.1
184
+ -----
185
+ * Fix bug in unsetting of exclusive mode
186
+ * New incident report system for providing better debugging reports
187
+ * Revert BasicObject proxies for now... they are causing problems
188
+ * String inspect that reveals bare object leaks
189
+ * Fix bug reporting proper task statuses
190
+ * Initial thread dumper support
191
+ * Remove Celluloid#alive? as it cannot be called in any manner that will ever
192
+ return anything but true, rendering it useless
193
+
194
+ 0.12.0
195
+ -----
196
+ * Alternative async syntax: actor.async.method in lieu of actor.method!
197
+ Original syntax still available but will be removed in Celluloid 1.0
198
+ * Alternative future syntax: actor.future.method in lieu of future(:method)
199
+ * All methods in the Celluloid module are now available on its singleton
200
+ * The #join and #kill methods are no longer available on the actor proxy.
201
+ Please use Celluloid::Actor.join(actor) and .kill(actor) instead.
202
+ * Celluloid::Future#ready? can be used to query for future readiness
203
+ * Celluloid::Group constant removed. Please use Celluloid::SupervisionGroup
204
+ * #monitor, #unmonitor, and #monitoring? provide unidirectional linking
205
+ * Linking is now performed via a SystemEvent
206
+ * SystemEvents are no longer exceptions. Boo exceptions as flow control!
207
+ * Celluloid::Mailbox#system_event eliminated and replaced with Mailbox#<<
208
+ SystemEvents are now automatically high priority
209
+ * The task_class class method can be used to override the class used for
210
+ tasks, allowing different task implementations to be configured on an
211
+ actor-by-actor-basis
212
+ * Celluloid::TaskThread provides tasks backed by Threads instead of Fibers
213
+ * ActorProxy is now a BasicObject
214
+ * A bug prevented Celluloid subclasses from retaining custom mailboxes
215
+ defined by use_mailbox. This is now fixed.
216
+ * `exclusive` class method without arguments makes the whole actor exclusive
217
+
218
+ 0.11.1
219
+ -----
220
+ * 'exclusive' class method marks methods as always exclusive and runs them
221
+ outside of a Fiber (useful if you need more stack than Fibers provide)
222
+ * Celluloid::PoolManager returns its own class when #class is called, instead
223
+ of proxying to a cell/actor in the pool.
224
+ * #receive now handles SystemEvents internally
225
+ * Celluloid::Timers extracted into the timers gem, which Celluloid now
226
+ uses for its own timers
227
+
228
+ 0.11.0
229
+ -----
230
+ * Celluloid::Application constant permanently removed
231
+ * Celluloid::Pool removed in favor of Celluloid.pool
232
+ * Celluloid::Group renamed to Celluloid::SupervisionGroup, old name is
233
+ still available and has not been deprecated
234
+ * Celluloid::ThreadPool renamed to Celluloid::InternalPool to emphasize its
235
+ internalness
236
+ * Support for asynchronously calling private methods inside actors
237
+ * Future is now an instance method on all actors
238
+ * Async call exception logs now contain the failed method
239
+ * MyActor#async makes async calls for those who dislike the predicate syntax
240
+ * abort can now accept a string instead of an exception object and will raise
241
+ RuntimeError in the caller's context
242
+
243
+ 0.10.0
244
+ -----
245
+ * Celluloid::Actor.current is now the de facto way to obtain the current actor
246
+ * #terminate now uses system messages, making termination take priority over
247
+ other pending methods
248
+ * #terminate! provides asynchronous termination
249
+
250
+ 0.9.1
251
+ -----
252
+ * Recurring timers with Celluloid#every(n) { ... }
253
+ * Obtain UUIDs with Celluloid.uuid
254
+ * Obtain the number of CPU cores available with Celluloid.cores
255
+ * Celluloid::Pool defaults to one actor per CPU core max by default
256
+
257
+ 0.9.0
258
+ -----
259
+ * Celluloid::Pool supervises pools of actors
260
+ * Graceful shutdown which calls #terminate on all actors
261
+ * Celluloid::Actor.all returns all running actors
262
+ * Celluloid#exclusive runs a high priority block which prevents other methods
263
+ from executing
264
+ * Celluloid.exception_handler { |ex| ... } defines a callback for notifying
265
+ exceptions (for use with Airbrake, exception_notifier, etc.)
266
+
267
+ 0.8.0
268
+ -----
269
+ * Celluloid::Application is now Celluloid::Group
270
+ * Futures no longer use a thread unless created with a block
271
+ * No more future thread-leaks! Future threads auto-terminate now
272
+ * Rename Celluloid#async to Celluloid#defer
273
+ * Celluloid#tasks now returns an array of tasks with a #status attribute
274
+ * Reduce coupling between Celluloid and DCell. Breaks compatibility with
275
+ earlier versions of DCell.
276
+ * Celluloid::FSMs are no longer actors themselves
277
+ * Benchmarks using benchmark_suite
278
+
279
+ 0.7.2
280
+ -----
281
+ * Workaround fiber problems on JRuby 1.6.5.1 in addition to 1.6.5
282
+ * Fix class displayed when inspecting dead actors
283
+
284
+ 0.7.1
285
+ -----
286
+ * More examples!
287
+ * Cancel all pending tasks when actors crash
288
+ * Log all errors that occur during signaling failures
289
+ * Work around thread-local issues on rbx (see 52325ecd)
290
+
291
+ 0.7.0
292
+ -----
293
+ * Celluloid::Task abstraction replaces Celluloid::Fiber
294
+ * Celluloid#tasks API to introspect on running tasks
295
+ * Move Celluloid::IO into its own gem, celluloid-io
296
+ * Finite state machines with Celluloid::FSM
297
+ * Fix bugs in supervisors handling actors that crash during initialize
298
+ * Old syntax Celluloid::Future() { ... } deprecated. Please use the #future
299
+ method or Celluloid::Future.new { ... } to create futures
300
+ * New timer subsystem! Bullet point-by-bullet point details below
301
+ * Celluloid#after registers a callback to fire after a given time interval
302
+ * Celluloid.sleep and Celluloid#sleep let an actor continue processing messages
303
+ * Celluloid.receive and Celluloid#receive now accept an optional timeout
304
+ * Celluloid::Mailbox#receive now accepts an optional timeout
305
+
306
+ 0.6.2
307
+ -----
308
+ * List all registered actors with Celluloid::Actor.registered
309
+ * All logging now handled through Celluloid::Logger
310
+ * Rescue DeadActorError in Celluloid::ActorProxy#inspect
311
+
312
+ 0.6.1
313
+ -----
314
+ * Celluloid#links obtains Celluloid::Links for a given actor
315
+ * The #class method is now proxied to actors
316
+ * Celluloid::Fiber replaces the Celluloid.fiber and Celluloid.resume_fiber API
317
+ * Use Thread.mailbox instead of Thread.current.mailbox to obtain the mailbox
318
+ for the current thread
319
+
320
+ 0.6.0
321
+ -----
322
+ * Celluloid::Application classes for describing the structure of applications
323
+ built with Celluloid
324
+ * Methods of actors can now participate in the actor protocol directly via
325
+ Celluloid#receive
326
+ * Configure custom mailbox types using Celluloid.use_mailbox
327
+ * Define a custom finalizer for an actor by defining MyActor#finalize
328
+ * Actor.call and Actor.async API for making direct calls to mailboxes
329
+ * Fix bugs in Celluloid::Supervisors which would crash on startup if the actor
330
+ they're supervising also crashes on startup
331
+ * Add Celluloid.fiber and Celluloid.resume_fiber to allow extension APIs to
332
+ participate in the Celluloid fiber protocol
333
+
334
+ 0.5.0
335
+ -----
336
+ * "include Celluloid::Actor" no longer supported. Use "include Celluloid"
337
+ * New Celluloid::IO module for actors that multiplex IO operations
338
+ * Major overhaul of Celluloid::Actor internals (see 25e22cc1)
339
+ * Actor threads are pooled in Celluloid::Actor::Pool, improving the speed
340
+ of creating short-lived actors by over 2X
341
+ * Classes that include Celluloid now have a #current_actor instance method
342
+ * Celluloid#async allows actors to make indefinitely blocking calls while
343
+ still responding to messages
344
+ * Fix a potential thread safety bug in Thread#mailbox
345
+ * Experimental Celluloid::TCPServer for people wanting to write servers in
346
+ Celluloid. This may wind up in another gem, so use at your own risk!
347
+ * Magically skip ahead a few version numbers to impart the magnitude of this
348
+ release. It's my versioning scheme and I can do what I wanna.
349
+
350
+ 0.2.2
351
+ -----
352
+
353
+ * AbortErrors now reraise in caller scope and get a caller-focused backtrace
354
+ * Log failed async calls instead of just letting them fail silently
355
+ * Properly handle arity of synchronous calls
356
+ * Actors can now make async calls to themselves
357
+ * Resolve crashes that occur when sending responses to exited/dead callers
358
+
359
+ 0.2.1
360
+ -----
361
+
362
+ * Hack around a bug of an indeterminate cause (2baba3d2)
363
+ * COLON!#@!
364
+
365
+ 0.2.0
366
+ -----
367
+
368
+ * Support for future method calls with MyActor#future
369
+ * Initial signaling support via MyActor#signal and MyActor#wait
370
+ * Just "include Celluloid" works in lieu of "include Celluloid::Actor"
371
+ * Futures terminate implicitly when their values are obtained
372
+ * Add an underscore prefix to all of Celluloid's instance variables so they don't
373
+ clash with user-defined ones.
374
+
375
+ 0.1.0
376
+ -----
377
+ * Fiber-based reentrant actors. Requires Ruby 1.9
378
+ * MyActor.new (where MyActor includes Celluloid::Actor) is now identical to .spawn
379
+ * Terminate actors with MyActor#terminate
380
+ * Obtain current actor with Celluloid.current_actor
381
+ * Configurable logger with Celluloid.logger
382
+ * Synchronization now based on ConditionVariables instead of Celluloid::Waker
383
+ * Determine if you're in actor scope with Celluloid.actor?
384
+
385
+ 0.0.3
386
+ -----
387
+ * Remove self-referential dependency in gemspec
388
+
389
+ 0.0.1
390
+ -----
391
+ * Initial release
392
+
393
+ [@ioquatix]: https://github.com/ioquatix
394
+ [@TiagoCardoso1983]: https://github.com/TiagoCardoso1983
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2014 Tony Arcieri
1
+ Copyright (c) 2011-2016 Tony Arcieri, Donovan Keme
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  ![Celluloid](https://raw.github.com/celluloid/celluloid-logos/master/celluloid/celluloid.png)
2
2
  =========
3
- [![Gem Version](https://badge.fury.io/rb/celluloid.png)](http://rubygems.org/gems/celluloid)
4
- [![Build Status](https://secure.travis-ci.org/celluloid/celluloid.png?branch=master)](http://travis-ci.org/celluloid/celluloid)
5
- [![Code Climate](https://codeclimate.com/github/celluloid/celluloid.png)](https://codeclimate.com/github/celluloid/celluloid)
6
- [![Coverage Status](https://coveralls.io/repos/celluloid/celluloid/badge.png?branch=master)](https://coveralls.io/r/celluloid/celluloid)
3
+ [![Gem Version](https://badge.fury.io/rb/celluloid.svg)](http://rubygems.org/gems/celluloid)
4
+ [![Build Status](https://secure.travis-ci.org/celluloid/celluloid.svg?branch=master)](http://travis-ci.org/celluloid/celluloid)
5
+ [![Code Climate](https://codeclimate.com/github/celluloid/celluloid.svg)](https://codeclimate.com/github/celluloid/celluloid)
6
+ [![Coverage Status](https://coveralls.io/repos/celluloid/celluloid/badge.svg?branch=master)](https://coveralls.io/r/celluloid/celluloid)
7
7
 
8
8
  > "I thought of objects being like biological cells and/or individual
9
9
  > computers on a network, only able to communicate with messages"
@@ -100,18 +100,24 @@ Related Projects
100
100
  Celluloid is the parent project of a related ecosystem of other projects. If you
101
101
  like Celluloid we definitely recommend you check them out:
102
102
 
103
- * [Celluloid::IO][celluloid-io]: "Evented" IO support for Celluloid actors
104
- * [Celluloid::ZMQ][celluloid-zmq]: "Evented" 0MQ support for Celluloid actors
103
+ * [Reel][reel]: An "evented" web server based on `Celluloid::IO`
105
104
  * [DCell][dcell]: The Celluloid actor protocol distributed over 0MQ
106
- * [Reel][reel]: An "evented" web server based on Celluloid::IO
107
- * [Lattice][lattice]: A concurrent realtime web framework based on Celluloid::IO
105
+ * [ECell][ecell]: Mesh strategies for `Celluloid` actors distributed over 0MQ
106
+ * [Celluloid::IO][celluloid-io]: "Evented" IO support for `Celluloid` actors
107
+ * [Celluloid::ZMQ][celluloid-zmq]: "Evented" 0MQ support for `Celluloid` actors
108
+ * [Celluloid::DNS][celluloid-dns]: An "evented" DNS server based on `Celluloid::IO`
109
+ * [Celluloid::SMTP][celluloid-smtp]: An "evented" SMTP server based on `Celluloid::IO`
110
+ * [Lattice][lattice]: A concurrent realtime web framework based on `Celluloid::IO`
108
111
  * [nio4r][nio4r]: "New IO for Ruby": high performance IO selectors
109
112
  * [Timers][timers]: A generic Ruby timer library for event-based systems
110
113
 
114
+ [reel]: https://github.com/celluloid/reel/
115
+ [dcell]: https://github.com/celluloid/dcell/
116
+ [ecell]: https://github.com/celluloid/ecell/
111
117
  [celluloid-io]: https://github.com/celluloid/celluloid-io/
112
118
  [celluloid-zmq]: https://github.com/celluloid/celluloid-zmq/
113
- [dcell]: https://github.com/celluloid/dcell/
114
- [reel]: https://github.com/celluloid/reel/
119
+ [celluloid-dns]: https://github.com/celluloid/celluloid-dns/
120
+ [celluloid-smtp]: https://github.com/celluloid/celluloid-smtp/
115
121
  [lattice]: https://github.com/celluloid/lattice/
116
122
  [nio4r]: https://github.com/celluloid/nio4r/
117
123
  [timers]: https://github.com/celluloid/timers/
@@ -133,16 +139,22 @@ Or install it yourself as:
133
139
 
134
140
  $ gem install celluloid
135
141
 
136
- Inside of your Ruby program, require Celluloid with:
142
+ Inside of your Ruby program, require Celluloid with [newest API](https://github.com/celluloid/celluloid/wiki/DEPRECATION-WARNING):
137
143
 
138
144
  ```ruby
139
- require 'celluloid/autostart'
145
+ require 'celluloid/current'
146
+ ```
147
+
148
+ Or to support the old API, use:
149
+
150
+ ```ruby
151
+ require 'celluloid/backported'
140
152
  ```
141
153
 
142
154
  Supported Platforms
143
155
  -------------------
144
156
 
145
- Celluloid works on Ruby 1.9.3, 2.0.0, JRuby 1.6+, and Rubinius 2.0.
157
+ Celluloid works on Ruby 2.0+, JRuby 1.7+, and Rubinius 2.0.
146
158
 
147
159
  JRuby or Rubinius are the preferred platforms as they support true thread-level
148
160
  parallelism when executing Ruby code, whereas MRI/YARV is constrained by a global
@@ -168,5 +180,6 @@ Contributing to Celluloid
168
180
  License
169
181
  -------
170
182
 
171
- Copyright (c) 2011-2014 Tony Arcieri. Distributed under the MIT License. See
172
- LICENSE.txt for further details.
183
+ Copyright (c) 2011-2015 Tony Arcieri, Donovan Keme.
184
+
185
+ Distributed under the MIT License. See [LICENSE.txt](https://github.com/celluloid/celluloid/blob/master/LICENSE.txt) for further details.
@@ -0,0 +1,28 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all
4
+ people who contribute through reporting issues, posting feature requests,
5
+ updating documentation, submitting pull requests or patches, and other
6
+ activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, age, or religion.
12
+
13
+ Examples of unacceptable behavior by participants include the use of sexual
14
+ language or imagery, derogatory comments or personal attacks, trolling, public
15
+ or private harassment, insults, or other unprofessional conduct.
16
+
17
+ Project maintainers have the right and responsibility to remove, edit, or
18
+ reject comments, commits, code, wiki edits, issues, and other contributions
19
+ that are not aligned to this Code of Conduct. Project maintainers who do not
20
+ follow the Code of Conduct may be removed from the project team.
21
+
22
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
23
+ reported by opening an issue or contacting one or more of the project
24
+ maintainers.
25
+
26
+ This Code of Conduct is adapted from the [Contributor Covenant](http
27
+ :contributor-covenant.org), version 1.0.0, available at [http://contributor-
28
+ covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/culture/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source "https://rubygems.org"
2
+
3
+ group :development, :test do
4
+ gem "rubocop"
5
+ gem "rspec"
6
+ gem "rake"
7
+ end
8
+
9
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Tony Arcieri, Donovan Keme
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/culture/README.md ADDED
@@ -0,0 +1,22 @@
1
+ Celluloid::Culture
2
+ ==================
3
+ [![Build Status](https://travis-ci.org/celluloid/culture.svg)](https://travis-ci.org/celluloid/culture)
4
+
5
+ ### Please see...
6
+ * Important [issues for discussion](/celluloid/culture/issues).
7
+ * Information about [Celluloid::Sync](SYNC.md).
8
+ * Information about [RuboCop](rubocop/README.md).
9
+
10
+
11
+ ## Integration
12
+ To add `celluloid/culture` and its many splendors to a gem, install it as a sub-module of the gem repository. Once you fully integrate [`Celluloid::Sync`](SYNC.md), the sub-module will be automatically refreshed.
13
+
14
+ ##### Add celluloid/culture as GIT submodule:
15
+ ```sh
16
+ git submodule add http://github.com/celluloid/culture.git
17
+ ```
18
+
19
+ Make sure `http://` is used and no other method of inclusion. CI needs it to be `http://`
20
+
21
+ ### Then what?
22
+ Once you've done that, read up on [Celluloid::Sync](SYNC.md) and [RuboCop](rubocop/README.md).
data/culture/Rakefile ADDED
@@ -0,0 +1,5 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ Dir["tasks/**/*.rake"].each { |task| load task }
4
+
5
+ task default: "rubocop"
data/culture/SYNC.md ADDED
@@ -0,0 +1,70 @@
1
+ # Celluloid::Sync
2
+
3
+ The `celluloid/culture` sub-module needs to be updated in ever repository which uses it, and integrations between all the gems in Celluloid's core suite began to need greater efficiency in handling many gems at once. This lead to the birth of `Celluloid::Sync` and its automation of several otherwise tedious tasks.
4
+
5
+
6
+ ## When all is said and done...
7
+
8
+ Running `bundle` or `rspec` will trigger `Celluloid::Sync` automatically, without slowing you down.
9
+
10
+ ---
11
+
12
+ ## So what does it do?
13
+
14
+ **1. It adds the gem you're in to the `$LOADPATH`.**
15
+
16
+ **2. It tries to find the `VERSION` constant for the current gem and load it.**
17
+
18
+ This allows easy inclusion of `VERSION` in gemspec, without individually including the required file first.
19
+
20
+ **3. It updates the `celluloid/culture` sub-module.**
21
+
22
+ Whenever `bundle` is run, the `culture/` directory is synchronized with the repository before it's used any further.
23
+
24
+ **4. It keeps `Gemfile` and `gemspec` requirements up to date.**
25
+
26
+ Avoid circular dependency errors, but still have the power to use locally sourced repositories.
27
+
28
+ ---
29
+
30
+ ## How is it installed in `Gemfile` and `gemspec` then?
31
+
32
+ Add the line above to the top of both files, before everything else:
33
+
34
+
35
+ ```ruby
36
+ require File.expand_path("../culture/sync", __FILE__)
37
+ ```
38
+
39
+
40
+ #### Finishing off `gemspec` ...
41
+
42
+ You only have one other line to add, other than line above ... right before the closing `end` in the file:
43
+
44
+ ```ruby
45
+ require File.expand_path("../culture/sync", __FILE__)
46
+ Gem::Specification.new do |gem|
47
+ # ...
48
+ # ...
49
+ # Keep in mind, the VERSION constant of this gem ought to be loaded.
50
+ # ...
51
+ # ...
52
+ Celluloid::Sync.gems(gem)
53
+ end
54
+
55
+ ```
56
+
57
+ #### Finishing off `Gemfile` ...
58
+
59
+ Same as in `gemspec` you have only two bits to add. The second line we're adding goes at the very end, or at least after `gemspec` is called:
60
+
61
+ ```ruby
62
+ require File.expand_path("../culture/sync", __FILE__)
63
+
64
+ # ...
65
+ # below any calls to `gemspec`
66
+ # below any other gems
67
+ # ...
68
+
69
+ Celluloid::Sync.gems(self)
70
+ ```
@@ -0,0 +1,18 @@
1
+ # coding: utf-8
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = "celluloid-culture"
5
+ spec.version = "0.2"
6
+ spec.authors = ["Tony Arcieri", "Donovan Keme"]
7
+ spec.email = ["bascule@gmail.com", "code@extremist.digital"]
8
+
9
+ spec.summary = "The culture of Celluloid, in RubyGem form!"
10
+ spec.description = "In which we try to codify Celluloid's life philosophy as Ruby"
11
+ spec.homepage = "https://github.com/celluloid/culture"
12
+
13
+ spec.files = Dir["README.md", "CHANGES.md", "LICENSE.txt", "lib/**/*", "spec/**/*"]
14
+ spec.require_path = "lib"
15
+
16
+ spec.add_development_dependency "bundler", "~> 1.9"
17
+ spec.add_development_dependency "rake", "~> 10.0"
18
+ end