• Home
  • Raw
  • Download

Lines Matching refs:thread

187       let thread: DbThread | undefined;
189 thread = threadBuild();
192 thread = new DbThread(new Worker(new URL('./TraceWorker', import.meta.url)));
194 thread = new DbThread(new Worker(new URL('./SqlLiteWorker', import.meta.url)));
196 thread = new DbThread(new Worker(new URL('./SqlLiteWorker', import.meta.url)));
199 if (thread) {
200 this.currentWasmThread = thread;
201 thread!.worker!.onerror = (err) => {
204 thread!.worker!.onmessageerror = (err) => {
207 this.threadPostMessage(thread);
208 thread!.id = i;
209 thread!.busy = false;
210 this.works?.push(thread!);
214 threadPostMessage(thread: DbThread) {
215 thread!.worker!.onmessage = (event: MessageEvent) => {
216 thread!.busy = false;
217 if (Reflect.has(thread!.taskMap, event.data.id)) {
219 let fun = thread!.taskMap[event.data.id];
223 Reflect.deleteProperty(thread!.taskMap, event.data.id);
225 let fun = thread!.taskMap[event.data.id];
237 let fun = thread!.taskMap[event.data.id];
248 Reflect.deleteProperty(thread!.taskMap, event.data.id);
250 let fun = thread!.taskMap[event.data.id];
254 Reflect.deleteProperty(thread!.taskMap, event.data.id);
265 for (let thread of this.works) {
266 let { status, msg } = await thread.dbOpen('');
280 for (let thread of this.works) {
281 …let { status, msg, buffer, sdkConfigMap, fileKey } = await thread.dbOpen(parseConfig, sdkWasmConfi…
352 for (let thread of this.works) { variable
353 thread.worker?.terminate();
360 let thread: DbThread; variable
363 thread = noBusyThreads[0];
364 thread.queryFunc(name, sql, args, handler, action);
367 thread = this.works[Math.floor(Math.random() * this.works.length)];
368 thread.queryFunc(name, sql, args, handler, action);
374 let thread: DbThread; variable
377 thread = noBusyThreads[0];
378 thread.queryProto(name, args, handler);
381 thread = this.works[Math.floor(Math.random() * this.works.length)];
382 if (thread) {
383 thread.queryProto(name, args, handler);
395 let thread: DbThread; variable
397 thread = noBusyThreads[0];
398 thread.cutFileByRange(leftTs, rightTs, handler);
400 thread = this.works[Math.floor(Math.random() * this.works.length)];
401 thread.cutFileByRange(leftTs, rightTs, handler);