tribe_em 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tribe_em/actor_proxy.rb +4 -4
- data/lib/tribe_em/tcp_server.rb +2 -2
- data/lib/tribe_em/version.rb +1 -1
- data/tribe_em.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4aa022afce8f840364b94a60b31ac6fb56b76c8d
|
4
|
+
data.tar.gz: 6739b4add66489b075bf1aa917daef80239bc372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ff4474fc22759a457da320d8084b5de057a3709e7c8b753582b0768369a2bf4c4ff3a13d668e25a2f9951cb8916ceecb1a3ce94c24b57f778ecd5d9a25d1515
|
7
|
+
data.tar.gz: a0dfa01303c3d39e762d611ef70735e754e90dbafae070d82471ebd4bafc474e984bd11f376504393e78871892deb5147d4f11a1b2daa89e8b7a9dee8d04f337
|
data/lib/tribe_em/actor_proxy.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Attempt to provide thread-safe communication between EventMachine and Tribe:
|
2
2
|
# 1. Always use EM.schedule to push work to the reactor thread.
|
3
|
-
# 2. Always use @actor.
|
3
|
+
# 2. Always use @actor.deliver_message! to push work to the actor's thread pool.
|
4
4
|
|
5
5
|
module Tribe
|
6
6
|
module EM
|
@@ -21,15 +21,15 @@ module Tribe
|
|
21
21
|
public
|
22
22
|
|
23
23
|
def post_init
|
24
|
-
@actor.
|
24
|
+
@actor.deliver_message!(:post_init, nil)
|
25
25
|
end
|
26
26
|
|
27
27
|
def receive_data(data)
|
28
|
-
@actor.
|
28
|
+
@actor.deliver_message!(:receive_data, data)
|
29
29
|
end
|
30
30
|
|
31
31
|
def unbind
|
32
|
-
@actor.
|
32
|
+
@actor.deliver_message!(:unbind, nil)
|
33
33
|
end
|
34
34
|
|
35
35
|
#
|
data/lib/tribe_em/tcp_server.rb
CHANGED
@@ -45,7 +45,7 @@ module Tribe
|
|
45
45
|
|
46
46
|
::EM.schedule do
|
47
47
|
sig = ::EM.start_server(@ip, @port, @actor_class.proxy_class, @actor_class, { :logger => @logger })
|
48
|
-
|
48
|
+
deliver_message!(:listener_started, sig)
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
@@ -55,7 +55,7 @@ module Tribe
|
|
55
55
|
sig = @server_sig
|
56
56
|
::EM.schedule do
|
57
57
|
::EM.stop_server(sig)
|
58
|
-
|
58
|
+
deliver_message!(:listener_stopped)
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
data/lib/tribe_em/version.rb
CHANGED
data/tribe_em.gemspec
CHANGED
@@ -17,6 +17,6 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ['lib']
|
19
19
|
|
20
|
-
gem.add_dependency('tribe', '~> 0.
|
20
|
+
gem.add_dependency('tribe', '~> 0.4')
|
21
21
|
gem.add_dependency('eventmachine', '>= 1.0.0')
|
22
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tribe_em
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chad Remesch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tribe
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: eventmachine
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|