AbstractScriptPool
abstract class AbstractScriptPool<T : AbstractScript>(size: Int, nullGlobalContext: Boolean) : AbstractEnginePool<T>
Abstract base class for a pool of AbstractScript instances.
When a script is returned to the pool, AbstractScript.resetForReuse prepares it for the next borrower. Subclasses populate the pool with populate in their init block. AbstractEnginePool describes borrowing and closing.
Parameters
size
the number of script instances in the pool; must be positive
nullGlobalContext
if true, resets the global scope bindings to null when recycling
Type Parameters
T
the concrete type of AbstractScript managed by this pool
Throws
if size is not positive