ocean.util.container.pool

Modules

AcquiredResources
module ocean.util.container.pool.AcquiredResources

Helper structs for a specific execution context to acquire and relinquish resources from a shared pool.

FreeList
module ocean.util.container.pool.FreeList

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.

ObjectPool
module ocean.util.container.pool.ObjectPool

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.

StructPool
module ocean.util.container.pool.StructPool

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.

model
module ocean.util.container.pool.model