Helper structs for a specific execution context to acquire and relinquish resources from a shared pool.
Simple pool class template with the following features: * Get and recycle items. Recycled items will be re-used before creating new items. * Fill the free list with a specific number of idle items. * The number of idle items in the free list can be queried.
Pool class template which stores class instances, has the following features: * Get and recycle items. Recycled items will be re-used before creating new items. * The total number of items, as well as the number of idle or busy items in the pool can be queried. * A limit can be applied to the pool, which prevents more than the specified number of items from being created. * A specified number of items can be pre-allocated in the pool using the fill() method. * The entire pool can be emptied, returning all items to the idle state, with clear(). * Iteration over all items in the pool, or all busy or idle items. (See further notes in the super class.) * For classes with a default (parameterless) constructor, get() and fill() methods exist which automatically create new pool items, without requiring them to be passed via a lazy argument.
Pool class template which stores struct instances, has the following features: * Get and recycle items. Recycled items will be re-used before creating new items. * The total number of items, as well as the number of idle or busy items in the pool can be queried. * A limit can be applied to the pool, which prevents more than the specified number of items from being created. * A specified number of items can be pre-allocated in the pool using the fill() method. * The entire pool can be emptied, returning all items to the idle state, with clear(). * Iteration over all items in the pool, or all busy or idle items. (See further notes in the super class.) * get() and fill() methods exist which automatically create new pool items, without requiring them to be passed via a lazy argument.