Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setTimeout(() => {
// We had some issues with what appeared to be a race condition at worker spawn time
expose(netWorker)
}, 50)
return true;
}
}
const poolWorker = new PoolWorker();
export type WorkerApi = Pick
const workerApi: WorkerApi = {
configure: (options: any) => poolWorker.configure(options),
createJob: (job: ITransactionWorkerJob) => poolWorker.createJob(job),
getObservable: () => poolWorker.getObservable(),
updateBlockHeight: (height: number) => poolWorker.updateBlockHeight(height),
}
expose(workerApi);