celluloid 0.15.0.pre → 0.15.0.pre2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/celluloid.rb +1 -1
- data/lib/celluloid/actor.rb +9 -5
- data/lib/celluloid/mailbox.rb +1 -1
- data/lib/celluloid/supervision_group.rb +1 -0
- data/spec/celluloid/supervision_group_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cb300092f64efcf674f30d6c086f4d007f57c24
|
4
|
+
data.tar.gz: c00b421edd82f1acd76e806673a6f9c4a697a613
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9b3e8d806a7cc0bcef413ebbab6c2687ec08a7bf00ecc5bc6505513972705ff8f82f2ea18f47d32afe41163e04252de0cfbbb42c95aae1601618d805c32d1be
|
7
|
+
data.tar.gz: 145c065574c7e372bc2da20c7141a5372b5c529db75ade1fcbeb44efcbd605287a5cf66d773cb4c731415731ba9060f452b98b4e64d8482045381448185046e9
|
data/lib/celluloid.rb
CHANGED
data/lib/celluloid/actor.rb
CHANGED
@@ -314,7 +314,7 @@ module Celluloid
|
|
314
314
|
message.dispatch
|
315
315
|
else
|
316
316
|
unless @receivers.handle_message(message)
|
317
|
-
Logger.debug "Discarded message (unhandled): #{message}"
|
317
|
+
Logger.debug "Discarded message (unhandled): #{message}" if $CELLULOID_DEBUG
|
318
318
|
end
|
319
319
|
end
|
320
320
|
message
|
@@ -368,11 +368,15 @@ module Celluloid
|
|
368
368
|
# Run the user-defined finalizer, if one is set
|
369
369
|
def run_finalizer
|
370
370
|
finalizer = @subject.class.finalizer
|
371
|
-
|
372
|
-
|
371
|
+
return unless finalizer && @subject.respond_to?(finalizer, true)
|
372
|
+
|
373
|
+
task(:finalizer, :method_name => finalizer, :dangerous_suspend => true) do
|
374
|
+
begin
|
375
|
+
@subject.__send__(finalizer)
|
376
|
+
rescue => ex
|
377
|
+
Logger.crash("#{@subject.class}#finalize crashed!", ex)
|
378
|
+
end
|
373
379
|
end
|
374
|
-
rescue => ex
|
375
|
-
Logger.crash("#{@subject.class}#finalize crashed!", ex)
|
376
380
|
end
|
377
381
|
|
378
382
|
# Clean up after this actor
|
data/lib/celluloid/mailbox.rb
CHANGED
@@ -28,6 +28,12 @@ describe Celluloid::SupervisionGroup do
|
|
28
28
|
my_registry[:example].should be_running
|
29
29
|
end
|
30
30
|
|
31
|
+
it "removes actors from the registry when terminating" do
|
32
|
+
group = MyGroup.run!
|
33
|
+
group.terminate
|
34
|
+
Celluloid::Actor[:example].should be_nil
|
35
|
+
end
|
36
|
+
|
31
37
|
context "pool" do
|
32
38
|
before :all do
|
33
39
|
class MyActor
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: celluloid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.0.
|
4
|
+
version: 0.15.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Arcieri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: timers
|