JsExecutionLimits Class
The limits of an execution scope (JsEngine.EnterExecutionScope): they apply to all the code that runs in the scope as a whole (the scripts, the calls, the jobs, the parsing of the sources), in addition to the limits of JsEngineOptions. A limit that is exceeded stops the code with a JsTerminationException.
public sealed class JsExecutionLimitsConstructors
| Name | Description |
|---|---|
| JsExecutionLimits() |
JsExecutionLimits()
public JsExecutionLimits()No documentation is available.
Properties
| Name | Description |
|---|---|
| CancellationToken | Gets the token that stops the code of the scope when it is canceled (JsTerminationReason.Canceled). It can be canceled from any thread, e.g. to stop a request whose client is gone. |
| MaxStatements | Gets the maximum number of statements of the scope, or null for no limit (see JsEngineOptions.MaxStatements). |
| MemoryLimit | Gets the maximum number of bytes allocated by the thread in the scope, or null for no limit (see JsEngineOptions.MemoryLimit). |
| Timeout | Gets the maximum duration of the scope, or null for no limit. |
CancellationToken
JsExecutionLimits.csGets the token that stops the code of the scope when it is canceled (JsTerminationReason.Canceled). It can be canceled from any thread, e.g. to stop a request whose client is gone.
public CancellationToken CancellationToken { get; init; }Property value
MaxStatements
JsExecutionLimits.csGets the maximum number of statements of the scope, or null for no limit (see JsEngineOptions.MaxStatements).
public long? MaxStatements { get; init; }Property value
MemoryLimit
JsExecutionLimits.csGets the maximum number of bytes allocated by the thread in the scope, or null for no limit (see JsEngineOptions.MemoryLimit).
public long? MemoryLimit { get; init; }