threadSafe
open fun <T : FactoryPools.Poolable?> threadSafe(size: Int, factory: FactoryPools.Factory<T>): Pool<T>
Content copied to clipboard
Returns a new thread safe Pool that never returns null
from acquire and that contains objects of the type created by the given Factory with the given maximum size.
If the pool is empty when acquire is called, the given Factory will be used to create a new instance.
Parameters
<T>
The type of object the pool will contains.