Lines Matching refs:thread
71 let thread: ConvertThread;
73 thread = new ConvertThread(new Worker(new URL('./ConvertTraceWorker', import.meta.url)));
75 thread!.worker!.onmessage = (event: MessageEvent) => {
76 thread.busy = false;
78 if (Reflect.has(thread.taskMap, event.data.id)) {
80 let fun = thread.taskMap[event.data.id];
84 Reflect.deleteProperty(thread.taskMap, event.data.id);
86 let fun = thread.taskMap[event.data.id];
90 Reflect.deleteProperty(thread.taskMap, event.data.id);
94 thread!.worker!.onmessageerror = (e) => {};
95 thread!.worker!.onerror = (e) => {};
96 thread!.id = i;
97 thread!.busy = false;
98 this.works?.push(thread!);
104 let thread = this.works[i];
105 thread.getConvertData(() => {});
111 let thread = this.works[i];
112 thread.worker!.terminate();
123 let thread: ConvertThread | undefined;
126 thread = noBusyThreads[0];
127 thread!.getConvertData(handler);
129 return thread;