Lines Matching refs:thread
138 …let thread: ProcedureThread = new ProcedureThread('trace/database/logic-worker/ProcedureLogicWorke…
141 thread.name = this.logicDataHandles[this.works.length - this.names.length];
142 thread.onmessage = (event: MessageEvent) => {
143 thread.busy = false;
146 thread.postMessage({
157 if (Reflect.has(thread.taskMap, event.data.id)) {
159 let fun = thread.taskMap[event.data.id];
167 if (Reflect.has(thread.taskMap, event.data.id)) {
169 let fun = thread.taskMap[event.data.id];
173 Reflect.deleteProperty(thread.taskMap, event.data.id);
180 thread.onmessageerror = (e) => {};
181 thread.onerror = (e) => {};
182 thread.id = this.works.length;
183 thread.busy = false;
184 this.works?.push(thread);
185 return thread;
190 let thread = this.works[i];
191 thread.terminate();
198 let thread = this.works[i];
199 thread.queryFunc('clear', {}, undefined, () => {});
205 let thread: ProcedureThread | undefined;
208 thread = noBusyThreads[0];
209 thread!.queryFunc(type, args, transfer, handler);
211 return thread;
217 let thread: ProcedureThread | undefined;
220 thread = noBusyThreads[0];
221 thread!.queryFunc(type, args, transfer, (res: any, hover: any) => {