IJavaScriptEnginePool Interface
Provides a shared pool of JavaScript engine instances. You should dispose the pool when no longer needed to properly dispose of any allocated engines.
Namespace
Statiq.Common
Interfaces
  • IDisposable
Implementing Types
graph BT Type-.->Interface0["IDisposable"] Type["IJavaScriptEnginePool"] class Type type-node Implementing0["TestJsEnginePool"]-.->Type click Implementing0 "/api/Statiq.Testing/TestJsEnginePool"

Syntax

public interface IJavaScriptEnginePool : IDisposable

Methods

Name Return Value Summary
GetEngine(TimeSpan?) IJavaScriptEngine
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.
RecycleAllEngines() void
Disposes all engines in this pool, and creates new engines in their place.
RecycleEngine(IJavaScriptEngine) void
Disposes the specified engine and removes it from the pool. A new engine will be created in it's place.

Extension Methods