In the NodeJS, it's possible to constructing worker both by process.fork and worker-thread.
Therefore, give option to specialize the work mode in the NodeJS, by supporting the type parameter in theWorkerConnector.
In the WorkerServer case, it would find the type by itself.
export class WorkerConnector<Header, Provider extends object | null>
extends ConnectorBase<Header, Provider>
implements IWorkerSystem
{
/**
* Initializer Constructor.
*
* @param header An object containing initialization data like activation.
* @param provider An object providing features for remote system.
* @param type You can specify the worker mode when NodeJS. Default is "thread".
*/
public constructor
(
header: Header,
provider: Provider,
type: "thread" | "process" = "thread"
)
}
In the NodeJS, it's possible to constructing worker both by
process.fork
andworker-thread
.Therefore, give option to specialize the work mode in the NodeJS, by supporting the
type
parameter in theWorkerConnector
.In the
WorkerServer
case, it would find thetype
by itself.