lib/rainbows/never_block.rb in rainbows-1.0.0pre1 vs lib/rainbows/never_block.rb in rainbows-1.0.0

- old
+ new

@@ -29,11 +29,14 @@ DEFAULTS.each { |k,v| O[k] ||= v } Integer === O[:pool_size] && O[:pool_size] > 0 or raise ArgumentError, "pool_size must a be an Integer > 0" mod = Rainbows.const_get(O[:backend]) require "never_block" # require EM first since we need a higher version - G.server.extend(mod) - G.server.extend(Core) + end + + def self.extended(klass) + klass.extend(Rainbows.const_get(O[:backend])) # EventMachine + klass.extend(Core) end module Core # :nodoc: all def self.setup self.const_set(:POOL, ::NB::Pool::FiberPool.new(O[:pool_size]))