Skip to content

Instantly share code, notes, and snippets.

@halorgium
Forked from tbuehlmann/Output
Last active December 17, 2015 04:58
Show Gist options
  • Save halorgium/5554085 to your computer and use it in GitHub Desktop.
Save halorgium/5554085 to your computer and use it in GitHub Desktop.
require 'celluloid'
class C
include Celluloid
def initialize(&block)
@block = block
end
def call
@block.call
end
end
class D
include Celluloid
def run
c = C.new { puts 'foo' }
c.call
end
end
D.new.run
foo
D, [2013-05-11T00:39:46.596057 #48493] DEBUG -- : Terminating 2 actors...
D, [2013-05-11T00:39:46.596526 #48493] DEBUG -- : Shutdown completed cleanly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment