rename to resolve waitpoint for clarity
This commit is contained in:
@@ -455,8 +455,8 @@ const zodIpc = new ZodIpcConnection({
|
||||
FLUSH: async ({ timeoutInMs }, sender) => {
|
||||
await flushAll(timeoutInMs);
|
||||
},
|
||||
WAITPOINT_COMPLETED: async ({ waitpoint }) => {
|
||||
sharedWorkerRuntime.completeWaitpoints([waitpoint]);
|
||||
RESOLVE_WAITPOINT: async ({ waitpoint }) => {
|
||||
sharedWorkerRuntime.resolveWaitpoints([waitpoint]);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -448,8 +448,8 @@ const zodIpc = new ZodIpcConnection({
|
||||
FLUSH: async ({ timeoutInMs }, sender) => {
|
||||
await flushAll(timeoutInMs);
|
||||
},
|
||||
WAITPOINT_COMPLETED: async ({ waitpoint }) => {
|
||||
sharedWorkerRuntime.completeWaitpoints([waitpoint]);
|
||||
RESOLVE_WAITPOINT: async ({ waitpoint }) => {
|
||||
sharedWorkerRuntime.resolveWaitpoints([waitpoint]);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -146,12 +146,12 @@ export class SharedRuntimeManager implements RuntimeManager {
|
||||
});
|
||||
}
|
||||
|
||||
async completeWaitpoints(waitpoints: CompletedWaitpoint[]): Promise<void> {
|
||||
await Promise.all(waitpoints.map((waitpoint) => this.completeWaitpoint(waitpoint)));
|
||||
async resolveWaitpoints(waitpoints: CompletedWaitpoint[]): Promise<void> {
|
||||
await Promise.all(waitpoints.map((waitpoint) => this.resolveWaitpoint(waitpoint)));
|
||||
}
|
||||
|
||||
private completeWaitpoint(waitpoint: CompletedWaitpoint): void {
|
||||
this.log("completeWaitpoint", waitpoint);
|
||||
private resolveWaitpoint(waitpoint: CompletedWaitpoint): void {
|
||||
this.log("resolveWaitpoint", waitpoint);
|
||||
|
||||
let waitId: string | undefined;
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ export const WorkerToExecutorMessageCatalog = {
|
||||
}),
|
||||
callback: z.void(),
|
||||
},
|
||||
WAITPOINT_COMPLETED: {
|
||||
RESOLVE_WAITPOINT: {
|
||||
message: z.object({
|
||||
version: z.literal("v1").default("v1"),
|
||||
waitpoint: CompletedWaitpoint,
|
||||
|
||||
Reference in New Issue
Block a user