diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2022-10-17 03:42:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-17 16:12:05 +0530 |
commit | 0dc2f02dfa2b299cd8a8d352c880b05be463cf0f (patch) | |
tree | 64b43b5ecadafeb6a4288e939c680b8b61b52a8d /ext/web/lib.rs | |
parent | 2b35cb3f2f3dee7bad2ddeff3b546020c6dfe18e (diff) |
perf(ext/web): optimize `op_cancel_handle` (#16318)
Towards #16315
Diffstat (limited to 'ext/web/lib.rs')
-rw-r--r-- | ext/web/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/web/lib.rs b/ext/web/lib.rs index 0eec63ab9..85e32b70a 100644 --- a/ext/web/lib.rs +++ b/ext/web/lib.rs @@ -338,8 +338,8 @@ fn op_encoding_encode_into( } /// Creates a [`CancelHandle`] resource that can be used to cancel invocations of certain ops. -#[op] -pub fn op_cancel_handle(state: &mut OpState) -> ResourceId { +#[op(fast)] +pub fn op_cancel_handle(state: &mut OpState) -> u32 { state.resource_table.add(CancelHandle::new()) } |