summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-09-06 23:08:37 +0530
committerGitHub <noreply@github.com>2022-09-06 23:08:37 +0530
commitd2a408f452db1157a1e6a14810bd1f03fc431d9d (patch)
tree66c45829a78cb3c6cd6e875cca65ce26384fe50d /runtime
parentc0a684c14ed70717e18b528bb8f366eb593636a7 (diff)
perf(runtime): short-circuit `queue_async_op` for Poll::Ready (#15773)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/js/40_testing.js1
-rw-r--r--runtime/ops/web_worker.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/runtime/js/40_testing.js b/runtime/js/40_testing.js
index e3a6ce324..c1ce3e726 100644
--- a/runtime/js/40_testing.js
+++ b/runtime/js/40_testing.js
@@ -147,6 +147,7 @@
// cleared can actually be removed from resource table, otherwise
// false positives may occur (https://github.com/denoland/deno/issues/4591)
await opSanitizerDelay();
+ await opSanitizerDelay();
}
if (shouldSkipSanitizers(desc)) return;
diff --git a/runtime/ops/web_worker.rs b/runtime/ops/web_worker.rs
index 184ebfddb..3c85d7b9e 100644
--- a/runtime/ops/web_worker.rs
+++ b/runtime/ops/web_worker.rs
@@ -39,7 +39,7 @@ fn op_worker_post_message(
Ok(())
}
-#[op]
+#[op(deferred)]
async fn op_worker_recv_message(
state: Rc<RefCell<OpState>>,
) -> Result<Option<JsMessageData>, AnyError> {