execute: (
data?: ThreadWorkerData,
name?: string,
- transferList?: TransferListItem[]
+ transferList?: readonly TransferListItem[]
) => Promise<ThreadWorkerResponse>
}
}
async (
data?: ThreadWorkerData,
name?: string,
- transferList?: TransferListItem[]
+ transferList?: readonly TransferListItem[]
): Promise<ThreadWorkerResponse> =>
await pool.execute(data, name, transferList)
)
execute: (
data?: WorkerData,
name?: string,
- transferList?: TransferListItem[]
+ transferList?: readonly TransferListItem[]
) => Promise<WorkerResponse>
}
}
async (
data?: WorkerData,
name?: string,
- transferList?: TransferListItem[]
+ transferList?: readonly TransferListItem[]
): Promise<WorkerResponse> => await pool.execute(data, name, transferList)
)
}
public async execute (
data?: Data,
name?: string,
- transferList?: TransferListItem[]
+ transferList?: readonly TransferListItem[]
): Promise<Response> {
return await new Promise<Response>((resolve, reject) => {
if (!this.started) {
protected abstract sendToWorker (
workerNodeKey: number,
message: MessageValue<Data>,
- transferList?: TransferListItem[]
+ transferList?: readonly TransferListItem[]
): void
/**
readonly execute: (
data?: Data,
name?: string,
- transferList?: TransferListItem[]
+ transferList?: readonly TransferListItem[]
) => Promise<Response>
/**
* Starts the minimum number of workers in this pool.
protected sendToWorker (
workerNodeKey: number,
message: MessageValue<Data>,
- transferList?: TransferListItem[]
+ transferList?: readonly TransferListItem[]
): void {
this.workerNodes[workerNodeKey]?.messageChannel?.port1.postMessage(
{
/**
* Array of transferable objects.
*/
- readonly transferList?: TransferListItem[]
+ readonly transferList?: readonly TransferListItem[]
/**
* Timestamp.
*/