lib/ballast/operation.rb in ballast-1.7.0 vs lib/ballast/operation.rb in ballast-1.8.0

- old
+ new

@@ -115,10 +115,10 @@ # If running under eventmachine, run the block in a thread of its threadpool using EM::Synchrony, otherwise run the block normally. # # @param block [Proc] The block to run. def in_em_thread(&block) - EM.reactor_running? ? EM::Synchrony.defer(&block) : block.call + Ballast.in_em_thread(&block) end # Forwards any missing method to the owner. # # @param method [Symbol] The method to forward. \ No newline at end of file