GetEngine(TimeSpan?) Method
Gets an engine from the pool. This engine should be disposed when you are finished with it. If an engine is free, this method returns immediately with the engine. If no engines are available but we have not reached the maximum number of engines yet, creates a new engine. If the maximum number of engines has been reached, blocks until an engine is available again.
Namespace
Statiq.Common
Containing Type
IJavaScriptEnginePool

Syntax

IJavaScriptEngine GetEngine(TimeSpan? timeout = null)

Parameters

Name Type Description
timeout TimeSpan? Maximum time to wait for a free engine. If not specified, defaults to the timeout specified when creating the pool.

Return Value

Type Description
IJavaScriptEngine A JavaScript engine.