IJavaScriptEnginePool.

GetEngine(Nullable<TimeSpan>) Method

Summary

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.
Assembly
Wyam.Common.dll
Namespace
Wyam.Common.JavaScript
Containing Type
IJavaScriptEnginePool

Syntax

IJavaScriptEngine GetEngine(Nullable<TimeSpan> timeout = null)

Parameters

Name Type Description
timeout Nullable<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.
GitHub