NodeWorker.IsMainThread property
Gets a value indicating whether the current code is running on the main JS thread; if false it is a worker thread.
C#
public static bool IsMainThread { get; }
Exceptions
exception | condition |
---|---|
JSInvalidThreadAccessException | No JS scope was established for the current thread. |
See Also
- class NodeWorker
- namespace Microsoft.JavaScript.NodeApi.Interop