mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
5b9620df7a
Implements fast scheduling of deferred op futures. ```rs #[op(fast)] async fn op_read( state: Rc<RefCell<OpState>>, rid: ResourceId, buf: &mut [u8], ) -> Result<u32, Error> { // ... } ``` The future is scheduled via a fast API call and polled by the event loop after being woken up by its waker.
7 lines
135 B
Rust
7 lines
135 B
Rust
async fn op_read(
|
|
state: Rc<RefCell<OpState>>,
|
|
rid: ResourceId,
|
|
buf: &mut [u8],
|
|
) -> Result<u32, Error> {
|
|
// @test-attr:fast
|
|
}
|