AbstractScriptPool
Abstract base class for a pool of AbstractScript instances.
Uses a coroutine Channel as a bounded buffer to manage script engine instances. When a script is returned to the pool, its context is automatically reset. Subclasses are responsible for populating the pool in their init block.
Parameters
size
the number of script instances in the pool
nullGlobalContext
if true, resets the global scope bindings to null when recycling
Type Parameters
T
the concrete type of AbstractScript managed by this pool