summaryrefslogtreecommitdiff
path: root/core/core.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-04-22 02:48:17 +0200
committerGitHub <noreply@github.com>2021-04-21 20:48:17 -0400
commit89bb774010b6b80bcbf7c19e8ed28f569abf4d90 (patch)
treeae6014561d2d1a14a27e7a2ba5c84849eb26ff31 /core/core.js
parenta7b487327595fc7f2a19458dfee54c2d39c706ee (diff)
refactor(core): kill recv() and init() (#10299)
`init()` was previously needed to init the shared queue, but now that it's gone `init()` only registers the async msg handler which is snapshot safe and constant since the op layer refactor.
Diffstat (limited to 'core/core.js')
-rw-r--r--core/core.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/core/core.js b/core/core.js
index 0697458de..a86ece436 100644
--- a/core/core.js
+++ b/core/core.js
@@ -3,8 +3,7 @@
((window) => {
// Available on start due to bindings.
- const core = window.Deno.core;
- const { recv, send } = core;
+ const { send } = window.Deno.core;
let opsCache = {};
const errorMap = {};
@@ -14,10 +13,6 @@
const NO_PROMISE = null; // Alias to null is faster than plain nulls
const promiseRing = new Array(RING_SIZE).fill(NO_PROMISE);
- function init() {
- recv(handleAsyncMsgFromRust);
- }
-
function setPromise(promiseId) {
const idx = promiseId % RING_SIZE;
// Move old promise from ring to map
@@ -131,6 +126,6 @@
close,
resources,
registerErrorClass,
- init,
+ handleAsyncMsgFromRust,
});
})(this);