lib/tobox/application.rb in tobox-0.1.6 vs lib/tobox/application.rb in tobox-0.2.0

- old
+ new

@@ -3,22 +3,23 @@ module Tobox class Application def initialize(configuration) @configuration = configuration @running = false - end - def start - return if @running - worker = @configuration[:worker] @pool = case worker when :thread then ThreadedPool when :fiber then FiberPool else worker end.new(@configuration) + end + def start + return if @running + + @pool.start @running = true end def stop return unless @running