amqp 0.7.0.pre → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/CHANGELOG +8 -2
- data/CONTRIBUTORS +22 -0
- data/Gemfile +3 -3
- data/README.md +20 -11
- data/Rakefile +30 -6
- data/amqp.gemspec +1 -1
- data/bin/cleanify.rb +50 -0
- data/examples/amqp/simple.rb +6 -4
- data/examples/mq/ack.rb +8 -6
- data/examples/mq/automatic_binding_for_default_direct_exchange.rb +65 -0
- data/examples/mq/callbacks.rb +9 -1
- data/examples/mq/clock.rb +17 -17
- data/examples/mq/hashtable.rb +19 -10
- data/examples/mq/internal.rb +13 -11
- data/examples/mq/logger.rb +38 -36
- data/examples/mq/multiclock.rb +16 -7
- data/examples/mq/pingpong.rb +16 -7
- data/examples/mq/pop.rb +8 -6
- data/examples/mq/primes-simple.rb +2 -0
- data/examples/mq/primes.rb +7 -5
- data/examples/mq/stocks.rb +14 -5
- data/lib/amqp.rb +12 -8
- data/lib/amqp/buffer.rb +35 -158
- data/lib/amqp/client.rb +34 -22
- data/lib/amqp/frame.rb +8 -64
- data/lib/amqp/protocol.rb +21 -70
- data/lib/amqp/server.rb +11 -9
- data/lib/amqp/spec.rb +8 -6
- data/lib/amqp/version.rb +2 -0
- data/lib/ext/blankslate.rb +3 -1
- data/lib/ext/em.rb +2 -0
- data/lib/ext/emfork.rb +13 -11
- data/lib/mq.rb +253 -156
- data/lib/mq/collection.rb +6 -88
- data/lib/mq/exchange.rb +70 -13
- data/lib/mq/header.rb +12 -6
- data/lib/mq/logger.rb +9 -7
- data/lib/mq/queue.rb +42 -30
- data/lib/mq/rpc.rb +6 -4
- data/protocol/codegen.rb +20 -18
- data/research/api.rb +10 -46
- data/research/primes-forked.rb +9 -7
- data/research/primes-processes.rb +74 -72
- data/research/primes-threaded.rb +9 -7
- data/spec/integration/automatic_binding_for_default_direct_exchange_spec.rb +61 -0
- data/spec/mq_helper.rb +70 -0
- data/spec/spec_helper.rb +84 -29
- data/spec/unit/amqp/buffer_spec.rb +178 -0
- data/spec/unit/amqp/client_spec.rb +472 -0
- data/spec/unit/amqp/frame_spec.rb +60 -0
- data/spec/unit/amqp/misc_spec.rb +123 -0
- data/spec/unit/amqp/protocol_spec.rb +53 -0
- data/spec/unit/mq/channel_close_spec.rb +15 -0
- data/spec/unit/mq/collection_spec.rb +129 -0
- data/spec/unit/mq/exchange_declaration_spec.rb +524 -0
- data/spec/unit/mq/misc_spec.rb +228 -0
- data/spec/unit/mq/mq_basic_spec.rb +39 -0
- data/spec/unit/mq/queue_declaration_spec.rb +97 -0
- data/spec/unit/mq/queue_spec.rb +71 -0
- metadata +33 -21
- data/Gemfile.lock +0 -16
- data/old/README +0 -30
- data/old/Rakefile +0 -12
- data/old/amqp-0.8.json +0 -606
- data/old/amqp_spec.rb +0 -796
- data/old/amqpc.rb +0 -695
- data/old/codegen.rb +0 -148
- data/spec/channel_close_spec.rb +0 -13
- data/spec/sync_async_spec.rb +0 -52
data/lib/mq/rpc.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
class MQ
|
2
4
|
# Basic RPC (remote procedure call) facility.
|
3
5
|
#
|
@@ -40,7 +42,7 @@ class MQ
|
|
40
42
|
# there is a valid destination. Failure to do so will just enqueue
|
41
43
|
# marshalled messages that are never consumed.
|
42
44
|
#
|
43
|
-
def initialize
|
45
|
+
def initialize(mq, queue, obj = nil)
|
44
46
|
@mq = mq
|
45
47
|
@mq.rpcs[queue] ||= self
|
46
48
|
|
@@ -54,7 +56,7 @@ class MQ
|
|
54
56
|
obj
|
55
57
|
end
|
56
58
|
|
57
|
-
@mq.queue(queue).subscribe(:ack=>true){ |info, request|
|
59
|
+
@mq.queue(queue).subscribe(:ack => true) { |info, request|
|
58
60
|
method, *args = ::Marshal.load(request)
|
59
61
|
ret = @obj.__send__(method, *args)
|
60
62
|
|
@@ -67,7 +69,7 @@ class MQ
|
|
67
69
|
else
|
68
70
|
@callbacks ||= {}
|
69
71
|
# XXX implement and use queue(nil)
|
70
|
-
@queue = @mq.queue(@name = "random identifier #{::Kernel.rand(999_999_999_999)}", :auto_delete => true).subscribe{|info, msg|
|
72
|
+
@queue = @mq.queue(@name = "random identifier #{::Kernel.rand(999_999_999_999)}", :auto_delete => true).subscribe { |info, msg|
|
71
73
|
if blk = @callbacks.delete(info.message_id)
|
72
74
|
blk.call ::Marshal.load(msg)
|
73
75
|
end
|
@@ -90,7 +92,7 @@ class MQ
|
|
90
92
|
# ....
|
91
93
|
# end
|
92
94
|
#
|
93
|
-
def method_missing
|
95
|
+
def method_missing(meth, *args, &blk)
|
94
96
|
# XXX use uuids instead
|
95
97
|
message_id = "random message id #{::Kernel.rand(999_999_999_999)}"
|
96
98
|
@callbacks[message_id] = blk if blk
|
data/protocol/codegen.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
require 'rubygems'
|
2
4
|
require 'json'
|
3
5
|
|
@@ -40,21 +42,21 @@ puts ERB.new(%q[
|
|
40
42
|
end
|
41
43
|
end
|
42
44
|
|
43
|
-
<%- s['constants'].select{|c| (1..8).include? c['value'] }.each do |c| -%>
|
44
|
-
class <%= c['name'].gsub(/^FRAME-/,'').split('-').map{|w| w.downcase.capitalize}.join.ljust(9) -%> < Frame( <%= c['value'] -%> ); end
|
45
|
+
<%- s['constants'].select { |c| (1..8).include? c['value'] }.each do |c| -%>
|
46
|
+
class <%= c['name'].gsub(/^FRAME-/, '').split('-').map { |w| w.downcase.capitalize}.join.ljust(9) -%> < Frame( <%= c['value'] -%> ); end
|
45
47
|
<%- end -%>
|
46
48
|
|
47
|
-
FOOTER = <%= frame_end = s['constants'].find{|c| c['name'] == 'FRAME-END' }['value'] %>
|
49
|
+
FOOTER = <%= frame_end = s['constants'].find { |c| c['name'] == 'FRAME-END' }['value'] %>
|
48
50
|
end
|
49
51
|
|
50
52
|
RESPONSES = {
|
51
|
-
<%- s['constants'].select{|c| c['value'] != frame_end and (200..500).include? c['value'] }.each do |c| -%>
|
52
|
-
<%= c['value'] %> => :<%= c['name'].tr('-', '_').gsub(/^FRAME_/,'').upcase -%>,
|
53
|
+
<%- s['constants'].select { |c| c['value'] != frame_end and (200..500).include? c['value'] }.each do |c| -%>
|
54
|
+
<%= c['value'] %> => :<%= c['name'].tr('-', '_').gsub(/^FRAME_/, '').upcase -%>,
|
53
55
|
<%- end -%>
|
54
56
|
}
|
55
57
|
|
56
58
|
FIELDS = [
|
57
|
-
<%- s['domains'].select{|d| d.first == d.last }.each do |d| -%>
|
59
|
+
<%- s['domains'].select { |d| d.first == d.last }.each do |d| -%>
|
58
60
|
:<%= d.first -%>,
|
59
61
|
<%- end -%>
|
60
62
|
]
|
@@ -70,7 +72,7 @@ puts ERB.new(%q[
|
|
70
72
|
end
|
71
73
|
]
|
72
74
|
end
|
73
|
-
|
75
|
+
|
74
76
|
def properties() @properties ||= [] end
|
75
77
|
|
76
78
|
def id() self::ID end
|
@@ -87,10 +89,10 @@ puts ERB.new(%q[
|
|
87
89
|
end
|
88
90
|
]
|
89
91
|
end
|
90
|
-
|
92
|
+
|
91
93
|
def arguments() @arguments ||= [] end
|
92
94
|
|
93
|
-
def section() Protocol.const_get(self.to_s[/Protocol::(.+?)::/,1]) end
|
95
|
+
def section() Protocol.const_get(self.to_s[/Protocol::(.+?)::/, 1]) end
|
94
96
|
def id() self::ID end
|
95
97
|
def name() self::NAME end
|
96
98
|
end
|
@@ -101,9 +103,9 @@ puts ERB.new(%q[
|
|
101
103
|
end
|
102
104
|
end
|
103
105
|
end
|
104
|
-
|
106
|
+
|
105
107
|
def self.methods() @methods ||= {} end
|
106
|
-
|
108
|
+
|
107
109
|
def self.Method(id, name)
|
108
110
|
@_base_methods ||= {}
|
109
111
|
@_base_methods[id] ||= ::Class.new(Method) do
|
@@ -136,7 +138,7 @@ puts ERB.new(%q[
|
|
136
138
|
end
|
137
139
|
end
|
138
140
|
end
|
139
|
-
|
141
|
+
|
140
142
|
module AMQP
|
141
143
|
module Protocol
|
142
144
|
<%- s['classes'].each do |c| -%>
|
@@ -146,20 +148,20 @@ puts ERB.new(%q[
|
|
146
148
|
<%- s['classes'].each do |c| -%>
|
147
149
|
class <%= c['name'].capitalize %>
|
148
150
|
<%- c['properties'].each do |p| -%>
|
149
|
-
<%= p['type'].ljust(10) %> :<%= p['name'].tr('-','_') %>
|
151
|
+
<%= p['type'].ljust(10) %> :<%= p['name'].tr('-', '_') %>
|
150
152
|
<%- end if c['properties'] -%>
|
151
153
|
|
152
154
|
<%- c['methods'].each do |m| -%>
|
153
|
-
class <%= m['name'].capitalize.gsub(/-(.)/){ "#{$1.upcase}"}.ljust(12) %> < Method( <%= m['id'].to_s.rjust(3) %>, :<%= m['name'].tr('- ','_').ljust(14) %> ); end
|
155
|
+
class <%= m['name'].capitalize.gsub(/-(.)/) { "#{$1.upcase}"}.ljust(12) %> < Method( <%= m['id'].to_s.rjust(3) %>, :<%= m['name'].tr('- ', '_').ljust(14) %> ); end
|
154
156
|
<%- end -%>
|
155
157
|
|
156
158
|
<%- c['methods'].each do |m| -%>
|
157
|
-
class <%= m['name'].capitalize.gsub(/-(.)/){ "#{$1.upcase}"} %>
|
159
|
+
class <%= m['name'].capitalize.gsub(/-(.)/) { "#{$1.upcase}"} %>
|
158
160
|
<%- m['arguments'].each do |a| -%>
|
159
161
|
<%- if a['domain'] -%>
|
160
|
-
<%= s['domains'].find{|k,v| k == a['domain']}.last.ljust(10) %> :<%= a['name'].tr('- ','_') %>
|
162
|
+
<%= s['domains'].find { |k, v| k == a['domain']}.last.ljust(10) %> :<%= a['name'].tr('- ', '_') %>
|
161
163
|
<%- else -%>
|
162
|
-
<%= a['type'].ljust(10) %> :<%= a['name'].tr('- ','_') %>
|
164
|
+
<%= a['type'].ljust(10) %> :<%= a['name'].tr('- ', '_') %>
|
163
165
|
<%- end -%>
|
164
166
|
<%- end if m['arguments'] -%>
|
165
167
|
end
|
@@ -170,4 +172,4 @@ puts ERB.new(%q[
|
|
170
172
|
<%- end -%>
|
171
173
|
end
|
172
174
|
end
|
173
|
-
].gsub!(/^ /,''), nil, '>-%').result(binding)
|
175
|
+
].gsub!(/^ /, ''), nil, '>-%').result(binding)
|
data/research/api.rb
CHANGED
@@ -1,17 +1,19 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
$:.unshift File.dirname(__FILE__) + '/../lib'
|
2
4
|
require 'rubygems'
|
3
5
|
require 'amqp'
|
4
6
|
|
5
7
|
# AMQP.start do |amqp|
|
6
8
|
# amqp.channel!(1)
|
7
|
-
#
|
9
|
+
#
|
8
10
|
# q = amqp.queue.declare(:queue => 'test',
|
9
11
|
# :exclusive => false,
|
10
12
|
# :auto_delete => true)
|
11
|
-
#
|
13
|
+
#
|
12
14
|
# q.bind(:exchange => '',
|
13
15
|
# :routing_key => 'test_route')
|
14
|
-
#
|
16
|
+
#
|
15
17
|
# amqp.basic.consume(:queue => q,
|
16
18
|
# :no_local => false,
|
17
19
|
# :no_ack => true) { |header, body|
|
@@ -23,7 +25,7 @@ AMQP.start do |amqp|
|
|
23
25
|
amqp.exchange('my_exchange', :topic) do |e|
|
24
26
|
e.publish(routing_key, data, :header => 'blah')
|
25
27
|
end
|
26
|
-
|
28
|
+
|
27
29
|
amqp.queue('my_queue').subscribe do |header, body|
|
28
30
|
p ['got', header, body]
|
29
31
|
end
|
@@ -40,49 +42,11 @@ mq.topic('test').publish('some data', :key => 'stock.usd.*')
|
|
40
42
|
|
41
43
|
# amq.queue('user1').bind(amq.topic('conversation.1'))
|
42
44
|
|
43
|
-
mq.queue('abc').get{}
|
44
|
-
mq.queue('abc').peek{}
|
45
|
-
mq.queue('abc').subscribe{ |body|
|
46
|
-
|
45
|
+
mq.queue('abc').get {}
|
46
|
+
mq.queue('abc').peek {}
|
47
|
+
mq.queue('abc').subscribe { |body|
|
48
|
+
|
47
49
|
}
|
48
50
|
|
49
51
|
mq.queue('abc').bind(:exchange => mq.topic, :routing_key => 'abc', :nowait => true, :arguments => {})
|
50
52
|
|
51
|
-
if $0 =~ /bacon/ or __FILE__ == $0
|
52
|
-
require 'bacon'
|
53
|
-
|
54
|
-
describe MQ do
|
55
|
-
before do
|
56
|
-
@mq = MQ.new
|
57
|
-
end
|
58
|
-
|
59
|
-
should 'have a channel' do
|
60
|
-
@mq.channel.should.be.kind_of? Fixnum
|
61
|
-
@mq.channel.should == 1
|
62
|
-
end
|
63
|
-
|
64
|
-
should 'give each thread a message queue' do
|
65
|
-
class MQ
|
66
|
-
@@cur_channel = 0
|
67
|
-
end
|
68
|
-
MQ.channel.should == 1
|
69
|
-
Thread.new{ MQ.channel }.value.should == 2
|
70
|
-
Thread.new{ MQ.channel }.value.should == 3
|
71
|
-
end
|
72
|
-
|
73
|
-
should 'create direct exchanges' do
|
74
|
-
@mq.direct.name.should == 'amq.direct'
|
75
|
-
@mq.direct(nil).name.should =~ /^\d+$/
|
76
|
-
@mq.direct('name').name.should == 'name'
|
77
|
-
end
|
78
|
-
|
79
|
-
should 'create fanout and topic exchanges' do
|
80
|
-
@mq.fanout.name.should == 'amq.fanout'
|
81
|
-
@mq.topic.name.should == 'amq.topic'
|
82
|
-
end
|
83
|
-
|
84
|
-
should 'create queues' do
|
85
|
-
q = @mq.queue('test')
|
86
|
-
end
|
87
|
-
end
|
88
|
-
end
|
data/research/primes-forked.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
$:.unshift File.dirname(__FILE__) + '/../lib'
|
2
4
|
require 'mq'
|
3
5
|
|
@@ -7,8 +9,8 @@ def EM.fork &blk
|
|
7
9
|
raise if reactor_running?
|
8
10
|
|
9
11
|
unless @forks
|
10
|
-
at_exit{
|
11
|
-
@forks.each{ |pid| Process.kill('KILL', pid) }
|
12
|
+
at_exit {
|
13
|
+
@forks.each { |pid| Process.kill('KILL', pid) }
|
12
14
|
}
|
13
15
|
end
|
14
16
|
|
@@ -17,7 +19,7 @@ def EM.fork &blk
|
|
17
19
|
end
|
18
20
|
end
|
19
21
|
|
20
|
-
def log
|
22
|
+
def log(*args)
|
21
23
|
p args
|
22
24
|
end
|
23
25
|
|
@@ -28,7 +30,7 @@ end
|
|
28
30
|
workers = ARGV[0] ? (Integer(ARGV[0]) rescue 2) : 2
|
29
31
|
|
30
32
|
workers.times do
|
31
|
-
EM.fork{
|
33
|
+
EM.fork {
|
32
34
|
log "prime checker", Process.pid, :started
|
33
35
|
|
34
36
|
class Fixnum
|
@@ -37,7 +39,7 @@ end
|
|
37
39
|
end
|
38
40
|
end
|
39
41
|
|
40
|
-
MQ.queue('prime checker').subscribe{ |info, num|
|
42
|
+
MQ.queue('prime checker').subscribe { |info, num|
|
41
43
|
log "prime checker #{Process.pid}", :prime?, num
|
42
44
|
if Integer(num).prime?
|
43
45
|
MQ.queue(info.reply_to).publish(num, :reply_to => Process.pid)
|
@@ -48,8 +50,8 @@ end
|
|
48
50
|
|
49
51
|
# controller
|
50
52
|
|
51
|
-
EM.run{
|
52
|
-
MQ.queue('prime collector').subscribe{ |info, prime|
|
53
|
+
EM.run {
|
54
|
+
MQ.queue('prime collector').subscribe { |info, prime|
|
53
55
|
log 'prime collector', :received, prime, :from, info.reply_to
|
54
56
|
(@primes ||= []) << Integer(prime)
|
55
57
|
EM.stop_event_loop if prime == '499'
|
@@ -1,11 +1,13 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
$:.unshift File.dirname(__FILE__) + '/../lib'
|
2
4
|
require 'mq'
|
3
5
|
|
4
6
|
MAX = 500
|
5
7
|
|
6
|
-
EM.run{
|
8
|
+
EM.run {
|
7
9
|
|
8
|
-
def log
|
10
|
+
def log(*args)
|
9
11
|
p args
|
10
12
|
end
|
11
13
|
|
@@ -21,7 +23,7 @@ EM.run{
|
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
24
|
-
MQ.queue('prime checker').subscribe{ |info, num|
|
26
|
+
MQ.queue('prime checker').subscribe { |info, num|
|
25
27
|
log "prime checker #{Process.pid}", :prime?, num
|
26
28
|
if Integer(num).prime?
|
27
29
|
MQ.queue(info.reply_to).publish(num, :reply_to => Process.pid)
|
@@ -31,7 +33,7 @@ EM.run{
|
|
31
33
|
|
32
34
|
elsif ARGV[0] == 'controller'
|
33
35
|
|
34
|
-
MQ.queue('prime collector').subscribe{ |info, prime|
|
36
|
+
MQ.queue('prime collector').subscribe { |info, prime|
|
35
37
|
log 'prime collector', :received, prime, :from, info.reply_to
|
36
38
|
(@primes ||= []) << Integer(prime)
|
37
39
|
}
|
@@ -65,71 +67,71 @@ EM.run{
|
|
65
67
|
|
66
68
|
__END__
|
67
69
|
|
68
|
-
["prime checker", :started, {:pid=>1958}]
|
69
|
-
["prime checker", :started, {:pid=>1957}]
|
70
|
-
["prime checker", :started, {:pid=>1956}]
|
71
|
-
["prime checker", :prime?, "1", {:pid=>1958}]
|
72
|
-
["prime checker", :prime?, "2", {:pid=>1957}]
|
73
|
-
["prime collector", :received, "2", {:from_pid=>"1957"}]
|
74
|
-
["prime checker", :prime?, "3", {:pid=>1956}]
|
75
|
-
["prime collector", :received, "3", {:from_pid=>"1956"}]
|
76
|
-
["prime checker", :prime?, "4", {:pid=>1958}]
|
77
|
-
["prime checker", :prime?, "5", {:pid=>1957}]
|
78
|
-
["prime collector", :received, "5", {:from_pid=>"1957"}]
|
79
|
-
["prime checker", :prime?, "6", {:pid=>1956}]
|
80
|
-
["prime checker", :prime?, "7", {:pid=>1958}]
|
81
|
-
["prime collector", :received, "7", {:from_pid=>"1958"}]
|
82
|
-
["prime checker", :prime?, "8", {:pid=>1957}]
|
83
|
-
["prime checker", :prime?, "9", {:pid=>1956}]
|
84
|
-
["prime checker", :prime?, "10", {:pid=>1958}]
|
85
|
-
["prime checker", :prime?, "11", {:pid=>1957}]
|
86
|
-
["prime collector", :received, "11", {:from_pid=>"1957"}]
|
87
|
-
["prime checker", :prime?, "12", {:pid=>1956}]
|
88
|
-
["prime checker", :prime?, "13", {:pid=>1958}]
|
89
|
-
["prime collector", :received, "13", {:from_pid=>"1958"}]
|
90
|
-
["prime checker", :prime?, "14", {:pid=>1957}]
|
91
|
-
["prime checker", :prime?, "15", {:pid=>1956}]
|
92
|
-
["prime checker", :prime?, "16", {:pid=>1958}]
|
93
|
-
["prime checker", :prime?, "17", {:pid=>1957}]
|
94
|
-
["prime collector", :received, "17", {:from_pid=>"1957"}]
|
95
|
-
["prime checker", :prime?, "18", {:pid=>1956}]
|
96
|
-
["prime checker", :prime?, "19", {:pid=>1958}]
|
97
|
-
["prime collector", :received, "19", {:from_pid=>"1958"}]
|
98
|
-
["prime checker", :prime?, "20", {:pid=>1957}]
|
99
|
-
["prime checker", :prime?, "21", {:pid=>1956}]
|
100
|
-
["prime checker", :prime?, "22", {:pid=>1958}]
|
101
|
-
["prime checker", :prime?, "23", {:pid=>1957}]
|
102
|
-
["prime collector", :received, "23", {:from_pid=>"1957"}]
|
103
|
-
["prime checker", :prime?, "24", {:pid=>1956}]
|
104
|
-
["prime checker", :prime?, "25", {:pid=>1958}]
|
105
|
-
["prime checker", :prime?, "26", {:pid=>1957}]
|
106
|
-
["prime checker", :prime?, "27", {:pid=>1956}]
|
107
|
-
["prime checker", :prime?, "28", {:pid=>1958}]
|
108
|
-
["prime checker", :prime?, "29", {:pid=>1957}]
|
109
|
-
["prime collector", :received, "29", {:from_pid=>"1957"}]
|
110
|
-
["prime checker", :prime?, "30", {:pid=>1956}]
|
111
|
-
["prime checker", :prime?, "31", {:pid=>1958}]
|
112
|
-
["prime collector", :received, "31", {:from_pid=>"1958"}]
|
113
|
-
["prime checker", :prime?, "32", {:pid=>1957}]
|
114
|
-
["prime checker", :prime?, "33", {:pid=>1956}]
|
115
|
-
["prime checker", :prime?, "34", {:pid=>1958}]
|
116
|
-
["prime checker", :prime?, "35", {:pid=>1957}]
|
117
|
-
["prime checker", :prime?, "36", {:pid=>1956}]
|
118
|
-
["prime checker", :prime?, "37", {:pid=>1958}]
|
119
|
-
["prime collector", :received, "37", {:from_pid=>"1958"}]
|
120
|
-
["prime checker", :prime?, "38", {:pid=>1957}]
|
121
|
-
["prime checker", :prime?, "39", {:pid=>1956}]
|
122
|
-
["prime checker", :prime?, "40", {:pid=>1958}]
|
123
|
-
["prime checker", :prime?, "41", {:pid=>1957}]
|
124
|
-
["prime collector", :received, "41", {:from_pid=>"1957"}]
|
125
|
-
["prime checker", :prime?, "42", {:pid=>1956}]
|
126
|
-
["prime checker", :prime?, "43", {:pid=>1958}]
|
127
|
-
["prime collector", :received, "43", {:from_pid=>"1958"}]
|
128
|
-
["prime checker", :prime?, "44", {:pid=>1957}]
|
129
|
-
["prime checker", :prime?, "45", {:pid=>1956}]
|
130
|
-
["prime checker", :prime?, "46", {:pid=>1958}]
|
131
|
-
["prime checker", :prime?, "47", {:pid=>1957}]
|
132
|
-
["prime collector", :received, "47", {:from_pid=>"1957"}]
|
133
|
-
["prime checker", :prime?, "48", {:pid=>1956}]
|
134
|
-
["prime checker", :prime?, "49", {:pid=>1958}]
|
135
|
-
["prime checker", :prime?, "50", {:pid=>1957}]
|
70
|
+
["prime checker", :started, {:pid => 1958}]
|
71
|
+
["prime checker", :started, {:pid => 1957}]
|
72
|
+
["prime checker", :started, {:pid => 1956}]
|
73
|
+
["prime checker", :prime?, "1", {:pid => 1958}]
|
74
|
+
["prime checker", :prime?, "2", {:pid => 1957}]
|
75
|
+
["prime collector", :received, "2", {:from_pid => "1957"}]
|
76
|
+
["prime checker", :prime?, "3", {:pid => 1956}]
|
77
|
+
["prime collector", :received, "3", {:from_pid => "1956"}]
|
78
|
+
["prime checker", :prime?, "4", {:pid => 1958}]
|
79
|
+
["prime checker", :prime?, "5", {:pid => 1957}]
|
80
|
+
["prime collector", :received, "5", {:from_pid => "1957"}]
|
81
|
+
["prime checker", :prime?, "6", {:pid => 1956}]
|
82
|
+
["prime checker", :prime?, "7", {:pid => 1958}]
|
83
|
+
["prime collector", :received, "7", {:from_pid => "1958"}]
|
84
|
+
["prime checker", :prime?, "8", {:pid => 1957}]
|
85
|
+
["prime checker", :prime?, "9", {:pid => 1956}]
|
86
|
+
["prime checker", :prime?, "10", {:pid => 1958}]
|
87
|
+
["prime checker", :prime?, "11", {:pid => 1957}]
|
88
|
+
["prime collector", :received, "11", {:from_pid => "1957"}]
|
89
|
+
["prime checker", :prime?, "12", {:pid => 1956}]
|
90
|
+
["prime checker", :prime?, "13", {:pid => 1958}]
|
91
|
+
["prime collector", :received, "13", {:from_pid => "1958"}]
|
92
|
+
["prime checker", :prime?, "14", {:pid => 1957}]
|
93
|
+
["prime checker", :prime?, "15", {:pid => 1956}]
|
94
|
+
["prime checker", :prime?, "16", {:pid => 1958}]
|
95
|
+
["prime checker", :prime?, "17", {:pid => 1957}]
|
96
|
+
["prime collector", :received, "17", {:from_pid => "1957"}]
|
97
|
+
["prime checker", :prime?, "18", {:pid => 1956}]
|
98
|
+
["prime checker", :prime?, "19", {:pid => 1958}]
|
99
|
+
["prime collector", :received, "19", {:from_pid => "1958"}]
|
100
|
+
["prime checker", :prime?, "20", {:pid => 1957}]
|
101
|
+
["prime checker", :prime?, "21", {:pid => 1956}]
|
102
|
+
["prime checker", :prime?, "22", {:pid => 1958}]
|
103
|
+
["prime checker", :prime?, "23", {:pid => 1957}]
|
104
|
+
["prime collector", :received, "23", {:from_pid => "1957"}]
|
105
|
+
["prime checker", :prime?, "24", {:pid => 1956}]
|
106
|
+
["prime checker", :prime?, "25", {:pid => 1958}]
|
107
|
+
["prime checker", :prime?, "26", {:pid => 1957}]
|
108
|
+
["prime checker", :prime?, "27", {:pid => 1956}]
|
109
|
+
["prime checker", :prime?, "28", {:pid => 1958}]
|
110
|
+
["prime checker", :prime?, "29", {:pid => 1957}]
|
111
|
+
["prime collector", :received, "29", {:from_pid => "1957"}]
|
112
|
+
["prime checker", :prime?, "30", {:pid => 1956}]
|
113
|
+
["prime checker", :prime?, "31", {:pid => 1958}]
|
114
|
+
["prime collector", :received, "31", {:from_pid => "1958"}]
|
115
|
+
["prime checker", :prime?, "32", {:pid => 1957}]
|
116
|
+
["prime checker", :prime?, "33", {:pid => 1956}]
|
117
|
+
["prime checker", :prime?, "34", {:pid => 1958}]
|
118
|
+
["prime checker", :prime?, "35", {:pid => 1957}]
|
119
|
+
["prime checker", :prime?, "36", {:pid => 1956}]
|
120
|
+
["prime checker", :prime?, "37", {:pid => 1958}]
|
121
|
+
["prime collector", :received, "37", {:from_pid => "1958"}]
|
122
|
+
["prime checker", :prime?, "38", {:pid => 1957}]
|
123
|
+
["prime checker", :prime?, "39", {:pid => 1956}]
|
124
|
+
["prime checker", :prime?, "40", {:pid => 1958}]
|
125
|
+
["prime checker", :prime?, "41", {:pid => 1957}]
|
126
|
+
["prime collector", :received, "41", {:from_pid => "1957"}]
|
127
|
+
["prime checker", :prime?, "42", {:pid => 1956}]
|
128
|
+
["prime checker", :prime?, "43", {:pid => 1958}]
|
129
|
+
["prime collector", :received, "43", {:from_pid => "1958"}]
|
130
|
+
["prime checker", :prime?, "44", {:pid => 1957}]
|
131
|
+
["prime checker", :prime?, "45", {:pid => 1956}]
|
132
|
+
["prime checker", :prime?, "46", {:pid => 1958}]
|
133
|
+
["prime checker", :prime?, "47", {:pid => 1957}]
|
134
|
+
["prime collector", :received, "47", {:from_pid => "1957"}]
|
135
|
+
["prime checker", :prime?, "48", {:pid => 1956}]
|
136
|
+
["prime checker", :prime?, "49", {:pid => 1958}]
|
137
|
+
["prime checker", :prime?, "50", {:pid => 1957}]
|