Skip to content

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

Released under the MIT license