You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default DequeueRecycler.close() currently simply clears its internal queue and drops all instances on the floor for GC. During work for issue #5159 I found that this can be improved:
closing a recycler should properly dispose of the pooled instances via the factory
the factory currently conflates the functionality of per-instance "clean up & return to pool" and "destroy instance" behind the (according to Adrien badly named) cleanup() callback method.
So I suggest that we:
rename Recycler.C.clear(T) to recycle(T)
add a Recycler.C.destroy(T) to indicate that this particular instance needs to die
destroy() can then also be used when the recycler wants to kill off excess instances (on return).
While we're renaming things I'd also like to vote to rename the Recycler.C and Recycler.V interfaces to something more descriptive. :)
The text was updated successfully, but these errors were encountered:
- introduce additional destroy() callback that allows better control
over internals of recycled data
- introduced AbstractRecyclerC as superclass for Recycler factories
(Adrien) with empty destroy() by default
- added tests for destroy()
- cleaned up Recycler tests (reduce copy&paste)
- introduce additional destroy() callback that allows better control
over internals of recycled data
- introduced AbstractRecyclerC as superclass for Recycler factories
(Adrien) with empty destroy() by default
- added tests for destroy()
- cleaned up Recycler tests (reduce copy&paste)
The default DequeueRecycler.close() currently simply clears its internal queue and drops all instances on the floor for GC. During work for issue #5159 I found that this can be improved:
So I suggest that we:
While we're renaming things I'd also like to vote to rename the Recycler.C and Recycler.V interfaces to something more descriptive. :)
The text was updated successfully, but these errors were encountered: