You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
D, [2013-03-24T17:04:42.494344 #6194] DEBUG -- : Terminating 4 actors...
D, [2013-03-24T17:04:42.495761 #6194] DEBUG -- : Shutdown completed cleanly
/home/hristo/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/thread.rb:71:in sleep': deadlock detected (fatal) from /home/hristo/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/thread.rb:71:inwait'
from /home/hristo/Public/celluloid/lib/celluloid/mailbox.rb:67:in receive' from /home/hristo/Public/celluloid/lib/celluloid/calls.rb:40:inblock in wait'
from /home/hristo/Public/celluloid/lib/celluloid/calls.rb:39:in loop' from /home/hristo/Public/celluloid/lib/celluloid/calls.rb:39:inwait'
from /home/hristo/Public/celluloid/lib/celluloid.rb:57:in suspend' from /home/hristo/Public/celluloid/lib/celluloid/actor.rb:69:incall'
from /home/hristo/Public/celluloid/lib/celluloid/legacy.rb:14:in method_missing' from examples/redis_pubsub.rb:35:in
'
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'
require 'celluloid/autostart'
require 'celluloid/redis'
# REDIS = Redis.new( :driver => :celluloid )
class RedisPubSub
include Celluloid
def initialize
@@redis = ::Redis.new( :driver => :celluloid )
end
def send channel, message
@@redis.publish channel, message
end
def run
wait :terminate
end
def terminate
signal :terminate
super
end
end
publisher = RedisPubSub.new
at_exit { publisher.terminate }
publisher.send 'test', 'test message'
publisher.run
The text was updated successfully, but these errors were encountered:
I'm thinking this deadlock is due to your use of signals. I don't understand what you're trying to accomplish with them.
That said I don't think this is a celluloid-redis or celluloid-related issue at all. If you want to block on the publisher actor, don't use signals, use Celluloid.join(publisher)
Following code fails with:
D, [2013-03-24T17:04:42.494344 #6194] DEBUG -- : Terminating 4 actors...
'D, [2013-03-24T17:04:42.495761 #6194] DEBUG -- : Shutdown completed cleanly
/home/hristo/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/thread.rb:71:in
sleep': deadlock detected (fatal) from /home/hristo/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/thread.rb:71:in
wait'from /home/hristo/Public/celluloid/lib/celluloid/mailbox.rb:67:in
receive' from /home/hristo/Public/celluloid/lib/celluloid/calls.rb:40:in
block in wait'from /home/hristo/Public/celluloid/lib/celluloid/calls.rb:39:in
loop' from /home/hristo/Public/celluloid/lib/celluloid/calls.rb:39:in
wait'from /home/hristo/Public/celluloid/lib/celluloid.rb:57:in
suspend' from /home/hristo/Public/celluloid/lib/celluloid/actor.rb:69:in
call'from /home/hristo/Public/celluloid/lib/celluloid/legacy.rb:14:in
method_missing' from examples/redis_pubsub.rb:35:in
The text was updated successfully, but these errors were encountered: