The free items of one pool bucket, handed out in the order the most recent frame took them, whatever order they came back in, then those of earlier frames by recency.
More...
template<typename Item>
class donner::svg::TextureHandOutQueue< Item >
The free items of one pool bucket, handed out in the order the most recent frame took them, whatever order they came back in, then those of earlier frames by recency.
A frame that repeats the previous frame's acquisitions therefore gets back the same item for each one, which keeps caches keyed on item identity valid across unchanged frames. Items never handed out, and items whose stamp was dropped, carry a zero stamp: they go out after every item handed out, including those of the pool's first frame, in the order they were queued.
push, takeNext and takeLast each cost O(log n) and move the item a constant number of times, for in-order and out-of-order returns alike, so a bucket of many small textures costs no more per return than a bucket of a few.
- Template Parameters
-
| Item | Move-only or copyable item type, such as a texture handle. |