Created
November 19, 2012 19:28
-
-
Save tarcieri/4113104 to your computer and use it in GitHub Desktop.
Revisions
-
tarcieri revised this gist
Nov 19, 2012 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class Supervisor < Celluloid::SupervisionGroup pool Something, :as => :something end Supervisor.new Celluloid::Actor[:something].async.perform sleep -
sobrinho created this gist
Nov 19, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ require 'bundler/setup' require 'celluloid' class Something include Celluloid include Celluloid::Logger def perform # some complex operation sleep 10 info 'performed' end end class Supervisor < Celluloid::SupervisionGroup pool Something, :as => :something end Supervisor.run # never get here because supervisor stops the main thread Celluloid::Actor[:something].async.perform