Creates a new thread using a specified script
import { Thread } from 'nanothreads';const handle = new Thread<[number, number], number>('./worker.js');await handle.send(4, 1); // output: 5
Optional
Protected
Rest
Generated using TypeDoc
Creates a new thread using a specified script
Example