diff options
Diffstat (limited to 'cli/js/runtime_worker.ts')
-rw-r--r-- | cli/js/runtime_worker.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/js/runtime_worker.ts b/cli/js/runtime_worker.ts index 9cfd9229c..2b1dba088 100644 --- a/cli/js/runtime_worker.ts +++ b/cli/js/runtime_worker.ts @@ -16,7 +16,7 @@ import { windowOrWorkerGlobalScopeProperties, eventTargetProperties } from "./globals.ts"; -import { sendSync } from "./ops/dispatch_json.ts"; +import * as webWorkerOps from "./ops/web_worker.ts"; import { log } from "./util.ts"; import { TextEncoder } from "./web/text_encoding.ts"; import * as runtime from "./runtime.ts"; @@ -31,7 +31,7 @@ export const onerror: (e: { data: any }) => void = (): void => {}; export function postMessage(data: any): void { const dataJson = JSON.stringify(data); const dataIntArray = encoder.encode(dataJson); - sendSync("op_worker_post_message", {}, dataIntArray); + webWorkerOps.postMessage(dataIntArray); } let isClosing = false; @@ -43,7 +43,7 @@ export function close(): void { } isClosing = true; - sendSync("op_worker_close"); + webWorkerOps.close(); } export async function workerMessageRecvCallback(data: string): Promise<void> { |