Creates a worker pool of specified size
@param size [Integer] Size of pool @param name [String] name the name of the worker @param func [Proc] job to run in inside the worker pool
# File bundler/worker.rb, line 21 def initialize(size, name, func) @name = name @request_queue = Thread::Queue.new @response_queue = Thread::Queue.new @func = func @size = size @threads = nil @previous_interrupt_handler = nil end
Retrieves results of job function being executed in worker pool
# File bundler/worker.rb, line 40 def deq result = @response_queue.deq raise result.exception if result.is_a?(WrappedException) result end