perf(runtime): short-circuit queue_async_op for Poll::Ready (#15773)

This commit is contained in:
Divy Srivastava 2022-09-06 23:08:37 +05:30 committed by GitHub
parent c0a684c14e
commit d2a408f452
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 295 additions and 167 deletions

View file

@ -93,7 +93,7 @@ pub fn op_timer_handle(state: &mut OpState) -> ResourceId {
/// Waits asynchronously until either `millis` milliseconds have passed or the
/// [`TimerHandle`] resource given by `rid` has been canceled.
#[op]
#[op(deferred)]
pub async fn op_sleep(
state: Rc<RefCell<OpState>>,
millis: u64,