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

feat(ops): op2 async support (slow path only) #40

Merged
merged 15 commits into from
Jul 18, 2023

Conversation

mmastrac
Copy link
Contributor

@mmastrac mmastrac commented Jul 17, 2023

This implements:

  • #[op2(async)] for both fn -> impl Future and async fn.
  • Fastcalls are not (yet) supported
  • Result<impl Future<...>> is not yet supported

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions, but not a blocker to land and iterate further

core/runtime/ops.rs Show resolved Hide resolved
Comment on lines +622 to +625
let mut runtime = JsRuntime::new(RuntimeOptions {
extensions: vec![testing::init_ops_and_esm()],
..Default::default()
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random thought: we do this a lot, maybe we should add RuntimeOptions::with_extensions() to remove some of these verbose lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be awesome!

core/runtime/ops.rs Outdated Show resolved Hide resolved
ops/compile_test_runner/Cargo.toml Outdated Show resolved Hide resolved
ops/op2/README.md Outdated Show resolved Hide resolved
ops/op2/dispatch_async.rs Outdated Show resolved Hide resolved
@mmastrac mmastrac changed the title WIP: op2 async support feat(ops): op2 async support (slow path only) Jul 18, 2023
@mmastrac mmastrac merged commit 9b1d102 into denoland:main Jul 18, 2023
4 checks passed
@mmastrac mmastrac mentioned this pull request Jul 19, 2023
18 tasks
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

Successfully merging this pull request may close these issues.

None yet

2 participants