celluloid 0.0.3 → 0.1.0
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/README.md +25 -8
- data/lib/celluloid.rb +16 -7
- data/lib/celluloid.rbc +702 -0
- data/lib/celluloid/actor.rb +98 -32
- data/lib/celluloid/actor.rbc +4637 -0
- data/lib/celluloid/actor_proxy.rb +19 -3
- data/lib/celluloid/actor_proxy.rbc +1884 -0
- data/lib/celluloid/calls.rbc +1384 -0
- data/lib/celluloid/core_ext.rb +1 -1
- data/lib/celluloid/core_ext.rbc +255 -0
- data/lib/celluloid/events.rb +1 -1
- data/lib/celluloid/events.rbc +357 -0
- data/lib/celluloid/future.rbc +747 -0
- data/lib/celluloid/linking.rb +10 -0
- data/lib/celluloid/linking.rbc +1837 -0
- data/lib/celluloid/mailbox.rb +31 -37
- data/lib/celluloid/mailbox.rbc +1843 -0
- data/lib/celluloid/reference.rbc +128 -0
- data/lib/celluloid/registry.rbc +784 -0
- data/lib/celluloid/responses.rbc +344 -0
- data/lib/celluloid/supervisor.rbc +1032 -0
- data/lib/celluloid/tuple.rbc +459 -0
- data/lib/celluloid/version.rb +4 -0
- data/lib/celluloid/version.rbc +198 -0
- data/lib/celluloid/waker.rbc +0 -0
- metadata +36 -57
- data/.autotest +0 -14
- data/.document +0 -5
- data/.rspec +0 -3
- data/CHANGES.md +0 -8
- data/Gemfile +0 -13
- data/Gemfile.lock +0 -27
- data/LICENSE.txt +0 -20
- data/Rakefile +0 -51
- data/VERSION +0 -1
- data/celluloid.gemspec +0 -85
- data/lib/celluloid/waker.rb +0 -41
- data/spec/actor_spec.rb +0 -141
- data/spec/future_spec.rb +0 -20
- data/spec/mailbox_spec.rb +0 -50
- data/spec/registry_spec.rb +0 -22
- data/spec/spec_helper.rb +0 -9
- data/spec/supervisor_spec.rb +0 -94
- data/spec/waker_spec.rb +0 -34
data/spec/waker_spec.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Celluloid::Waker do
|
4
|
-
it "blocks until awoken" do
|
5
|
-
waker = Celluloid::Waker.new
|
6
|
-
thread = Thread.new do
|
7
|
-
waker.wait
|
8
|
-
:done
|
9
|
-
end
|
10
|
-
|
11
|
-
# Assert that the thread can't be joined at this point
|
12
|
-
thread.join(0).should be_nil
|
13
|
-
|
14
|
-
waker.signal
|
15
|
-
thread.value.should == :done
|
16
|
-
end
|
17
|
-
|
18
|
-
it "returns an IO object that can be multiplexed with IO.select" do
|
19
|
-
waker = Celluloid::Waker.new
|
20
|
-
waker.io.should be_an_instance_of(IO)
|
21
|
-
|
22
|
-
thread = Thread.new do
|
23
|
-
readable, _, _ = select [waker.io]
|
24
|
-
waker.wait
|
25
|
-
:done
|
26
|
-
end
|
27
|
-
|
28
|
-
# Assert that the thread can't be joined at this point
|
29
|
-
thread.join(0).should be_nil
|
30
|
-
|
31
|
-
waker.signal
|
32
|
-
thread.value.should == :done
|
33
|
-
end
|
34
|
-
end
|