NodejsEnvironment.SynchronizationContext property
Gets a synchronization context that enables switching to the Node.js environment's thread and returning to the thread after an await
.
C#
public JSSynchronizationContext SynchronizationContext { get; }
Remarks
Except where otherwise documented, all interaction with the environment and JavaScript values associated with the environment MUST be executed on the environment's thread. The "Post" and "Run" methods of this class use the synchronization context to switch to the JS thread.
See Also
- method Post
- method Post
- method Run
- method Run<T>
- method RunAsync
- method RunAsync<T>
- class JSSynchronizationContext
- class NodejsEnvironment
- namespace Microsoft.JavaScript.NodeApi.Runtime