diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2024-01-11 07:37:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 15:37:25 -0700 |
commit | 515a34b4de222e35c7ade1b92614d746e73d4c2e (patch) | |
tree | 8284201fc826a33f12597959a8a8be14e0f524bd /runtime/js/40_signals.js | |
parent | d4893eb51a01c5a692d8ca74a3b8ff95c5fd1d9f (diff) |
refactor: use `core.ensureFastOps()` (#21888)
Diffstat (limited to 'runtime/js/40_signals.js')
-rw-r--r-- | runtime/js/40_signals.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/runtime/js/40_signals.js b/runtime/js/40_signals.js index a1b1897fc..c654dd2dd 100644 --- a/runtime/js/40_signals.js +++ b/runtime/js/40_signals.js @@ -1,7 +1,11 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, primordials } from "ext:core/mod.js"; -const ops = core.ops; +const { + op_signal_bind, + op_signal_poll, + op_signal_unbind, +} = core.ensureFastOps(); const { SafeSet, SafeSetIterator, @@ -9,12 +13,9 @@ const { SetPrototypeDelete, TypeError, } = primordials; -const { - op_signal_poll, -} = core.ensureFastOps(); function bindSignal(signo) { - return ops.op_signal_bind(signo); + return op_signal_bind(signo); } function pollSignal(rid) { @@ -24,7 +25,7 @@ function pollSignal(rid) { } function unbindSignal(rid) { - ops.op_signal_unbind(rid); + op_signal_unbind(rid); } // Stores signal listeners and resource data. This has type of |