JavaScriptPool
class JavaScriptPool(size: Int, nullGlobalContext: Boolean = false) : AbstractScriptPool<JavaScript>
A pre-populated pool of JavaScript instances backed by a coroutine Channel.
Instances are created eagerly during initialization and recycled with context resets after each use.
Parameters
size
the number of JavaScript instances to create in the pool
nullGlobalContext
ignored: JavaScript binds variables into the engine scope, never the global scope, so its global context is always non-null. Retained for API symmetry with the other script pools.