Method: FTW::Pool#each

Defined in:
lib/ftw/pool.rb

#each(&block) ⇒ Object

Iterate over all pool members.

This holds the pool lock during this method, so you should not call ‘fetch’ or ‘add’.



60
61
62
63
64
65
66
# File 'lib/ftw/pool.rb', line 60

def each(&block)
  @lock.synchronize do
    @pool.each do |identifier, object|
      block.call(identifier, object)
    end
  end
end