IFreeList

Management interface to a free list.

Members

Functions

fill
typeof(this) fill(size_t num, T new_item)

Ensures that the free list contains at least the specified number of (idle) items. Useful to pre-allocate a free list of a certain size.

get
T get(T new_item)

Gets an item from the free list.

minimize
typeof(this) minimize(size_t num)

Ensures that the free list contains at most the specified number of items.

recycle
void recycle(T item)

Recycles an item into the free list.

Inherited Members

From IFreeListInfo

num_idle
size_t num_idle()

Returns the number of idle items in pool.

Meta