Class | FTW::Pool |
In: |
lib/ftw/pool.rb
lib/ftw/pool.rb |
Parent: | Object |
A simple thread-safe resource pool.
Resources in this pool must respond to ‘available?’. For best results, your resources should just ‘include FTW::Poolable‘
The primary use case was as a way to pool FTW::Connection instances.
Add an object to the pool with a given identifier. For example:
pool.add("www.google.com:80", connection1) pool.add("www.google.com:80", connection2) pool.add("github.com:443", connection3)
Add an object to the pool with a given identifier. For example:
pool.add("www.google.com:80", connection1) pool.add("www.google.com:80", connection2) pool.add("github.com:443", connection3)