mirror of
https://github.com/denoland/deno.git
synced 2025-01-08 07:08:27 -05:00
perf(ext/websocket): make op_server_ws_next_event
deferred (#18632)
Avoid attempting to read immediately, wasting time polling the future. 2% throughput improvement on Linux.
This commit is contained in:
parent
a1845a041b
commit
0b023538a0
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ pub async fn op_server_ws_close(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[op]
|
#[op(deferred)]
|
||||||
pub async fn op_server_ws_next_event(
|
pub async fn op_server_ws_next_event(
|
||||||
state: Rc<RefCell<OpState>>,
|
state: Rc<RefCell<OpState>>,
|
||||||
rid: ResourceId,
|
rid: ResourceId,
|
||||||
|
|
Loading…
Reference in a new issue