Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op2 fast async ops #147

Closed
littledivy opened this issue Aug 12, 2023 · 2 comments
Closed

op2 fast async ops #147

littledivy opened this issue Aug 12, 2023 · 2 comments

Comments

@littledivy
Copy link
Member

littledivy commented Aug 12, 2023

Fast async ops scheduled the op future in a fast call. This is used a lot in ext/websocket when we don't want to spend time polling the future in a slow call. eg:

https://github.com/denoland/deno/blob/main/ext/websocket/lib.rs#L576-L580

#[op(fast)]
pub async fn op_ws_next_event(
  state: Rc<RefCell<OpState>>,
  rid: ResourceId,
) -> u16 {

I couldn't find a way to do this with #[op2]. We should add support for it

@mmastrac
Copy link
Contributor

Definitely. This is currently unsupported -- it's not too hard but it requires a bit of work.

@mmastrac
Copy link
Contributor

Implemented!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants