Method: Zoidberg::Pool#_zoidberg_free_worker

Defined in:
lib/zoidberg/pool.rb

#_zoidberg_free_workerObject

Find or wait for a free worker



104
105
106
107
108
109
# File 'lib/zoidberg/pool.rb', line 104

def _zoidberg_free_worker
  unless(worker = _workers.detect(&:_zoidberg_available?))
    until((worker = _signal.wait_for(:unlocked))._zoidberg_available?); end
  end
  worker
end