How can I get notified when an async method has finished it's job (callback) when using Celluloid?
Sample code:
require 'celluloid/autostart'
class Test
include Celluloid
def initialize(aaa)
@aaa = aaa
end
def foo
sleep 20
@bbb = 'asdasd'
end
def bar
"aaa is: #{@aaa}, bbb is: #{@bbb}"
end
end
x = Test.new 111
x.async.foo
I would like to get notified as soon as the job inside foo is done.