chore: use url format for request id

This commit is contained in:
鲁树人 2023-05-18 22:12:45 +01:00
parent d00ba50fcd
commit 55e258f4ef

View File

@ -47,7 +47,7 @@ export class WorkerClientBus<T = string> {
async request<R, P>(actionName: T, payload: P): Promise<R> {
return new Promise((resolve, reject) => {
const id = nanoid();
const id = `request://${actionName}/${nanoid()}`;
this.idPromiseMap.set(id, [resolve, reject]);
this.worker.postMessage({
id,