summaryrefslogtreecommitdiff
path: root/runtime/ops/web_worker.rs
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-04-12 21:55:05 +0200
committerGitHub <noreply@github.com>2021-04-12 15:55:05 -0400
commit46b1c653c0c433932908b7610f60b409af134c76 (patch)
tree00d8b59c8c4e9b90538d548ebd828d2b3f94d4fd /runtime/ops/web_worker.rs
parenta20504642d083172f297543f9788b128e9c2e0bc (diff)
refactor(deno): remove concept of bin & json ops (#10145)
Diffstat (limited to 'runtime/ops/web_worker.rs')
-rw-r--r--runtime/ops/web_worker.rs20
1 files changed, 8 insertions, 12 deletions
diff --git a/runtime/ops/web_worker.rs b/runtime/ops/web_worker.rs
index 5f63a03b7..68cef110c 100644
--- a/runtime/ops/web_worker.rs
+++ b/runtime/ops/web_worker.rs
@@ -12,7 +12,7 @@ pub fn init(
) {
// Post message to host as guest worker.
let sender_ = sender.clone();
- super::reg_json_sync(
+ super::reg_sync(
rt,
"op_worker_post_message",
move |_state, _args: (), buf| {
@@ -27,15 +27,11 @@ pub fn init(
);
// Notify host that guest worker closes.
- super::reg_json_sync(
- rt,
- "op_worker_close",
- move |_state, _args: (), _bufs| {
- // Notify parent that we're finished
- sender.clone().close_channel();
- // Terminate execution of current worker
- handle.terminate();
- Ok(())
- },
- );
+ super::reg_sync(rt, "op_worker_close", move |_state, _args: (), _bufs| {
+ // Notify parent that we're finished
+ sender.clone().close_channel();
+ // Terminate execution of current worker
+ handle.terminate();
+ Ok(())
+ });
}