Celluloid async inside ruby blocks does not work
问题 Trying to implement Celluloid async on my working example seem to exhibit weird behavior. here my code looks class Indefinite include Celluloid def run! loop do [1].each do |i| async.on_background end end end def on_background puts "Running in background" end end Indefinite.new.run! but when I run the above code, I never see the puts " Running in Background " But, if I put a sleep the code seem to work. class Indefinite include Celluloid def run! loop do [1].each do |i| async.on_background