diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-09-12 00:10:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-12 00:10:43 +0200 |
commit | bdeb4bddbf5cabd04abe906388f5ebfe64a84c53 (patch) | |
tree | fd6aed583eac5108c4403ae424bc4246781bed0c /runtime/ops/signal.rs | |
parent | aaff69db3fd8cf70d1c031720e84874cb4a4d02c (diff) |
refactor: rewrite runtime/ ops to op2 (#20459)
Diffstat (limited to 'runtime/ops/signal.rs')
-rw-r--r-- | runtime/ops/signal.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/ops/signal.rs b/runtime/ops/signal.rs index ca1f2211d..8508aa56a 100644 --- a/runtime/ops/signal.rs +++ b/runtime/ops/signal.rs @@ -2,6 +2,7 @@ use deno_core::error::type_error; use deno_core::error::AnyError; use deno_core::op; +use deno_core::op2; use deno_core::AsyncRefCell; use deno_core::CancelFuture; use deno_core::CancelHandle; @@ -580,10 +581,10 @@ fn op_signal_bind( Ok(rid) } -#[op] +#[op2(async)] async fn op_signal_poll( state: Rc<RefCell<OpState>>, - rid: ResourceId, + #[smi] rid: ResourceId, ) -> Result<bool, AnyError> { let resource = state .borrow_mut() @@ -599,10 +600,10 @@ async fn op_signal_poll( } } -#[op] +#[op2(fast)] pub fn op_signal_unbind( state: &mut OpState, - rid: ResourceId, + #[smi] rid: ResourceId, ) -> Result<(), AnyError> { state.resource_table.close(rid)?; Ok(()) |