NodeWorker constructor (1 of 2)
Creates a new instance of NodeWorker
that runs a callback delegate in a Node.js worker thread.
C#
public NodeWorker(Action workerCallback, Options options)
parameter | description |
---|---|
workerCallback | Callback delegate to be invoked on the worker thread. (The callback may then invoke script and interop with the worker JS context.) |
options | Worker options. |
See Also
- class Options
- class NodeWorker
- namespace Microsoft.JavaScript.NodeApi.Interop
NodeWorker constructor (2 of 2)
Creates a new instance of NodeWorker
that runs a Node.js script in a separate worker thread.
C#
public NodeWorker(string workerScript, Options options)
parameter | description |
---|---|
workerScript | Path to the script file to run in the worker. Or if Eval is true the string is a script to be directly evaluated. |
options | Worker options. |
See Also
- class Options
- class NodeWorker
- namespace Microsoft.JavaScript.NodeApi.Interop