Method: HyperThread::Pool#nsync

Defined in:
lib/hyper_thread/pool.rb

#nsync(&block) ⇒ Object



47
48
49
50
51
52
53
# File 'lib/hyper_thread/pool.rb', line 47

def nsync(&block)
  @mutex.synchronize do
    break if @shutdown
    block.call
  end
  return if @shutdown
end