summaryrefslogtreecommitdiff
path: root/cli/rt/11_workers.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-09-16 22:22:43 +0200
committerGitHub <noreply@github.com>2020-09-16 22:22:43 +0200
commit6c4da0e429eb47dae6a220c5576a39f137615bb8 (patch)
treea8715428caea00105acc9a10fcd0f356085d3fa7 /cli/rt/11_workers.js
parent104aebdfb5d01f7482bacef6d58c2ce16da44334 (diff)
refactor: remove dispatch_json.js from cli/rt and cli/tsc (#7521)
Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync
Diffstat (limited to 'cli/rt/11_workers.js')
-rw-r--r--cli/rt/11_workers.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/rt/11_workers.js b/cli/rt/11_workers.js
index 9a23e3dd8..77ac273f4 100644
--- a/cli/rt/11_workers.js
+++ b/cli/rt/11_workers.js
@@ -2,8 +2,8 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
((window) => {
+ const core = window.Deno.core;
const { log } = window.__bootstrap.util;
- const { sendSync, sendAsync } = window.__bootstrap.dispatchJson;
/*
import { blobURLMap } from "./web/url.ts";
*/
@@ -15,7 +15,7 @@
useDenoNamespace,
name,
) {
- return sendSync("op_create_worker", {
+ return core.jsonOpSync("op_create_worker", {
specifier,
hasSourceCode,
sourceCode,
@@ -25,15 +25,15 @@
}
function hostTerminateWorker(id) {
- sendSync("op_host_terminate_worker", { id });
+ core.jsonOpSync("op_host_terminate_worker", { id });
}
function hostPostMessage(id, data) {
- sendSync("op_host_post_message", { id }, data);
+ core.jsonOpSync("op_host_post_message", { id }, data);
}
function hostGetMessage(id) {
- return sendAsync("op_host_get_message", { id });
+ return core.jsonOpAsync("op_host_get_message", { id });
}
const encoder = new TextEncoder();