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

How do you properly call an async function under tokio? #3531

Open
leobelen opened this issue Dec 21, 2023 · 0 comments
Open

How do you properly call an async function under tokio? #3531

leobelen opened this issue Dec 21, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@leobelen
Copy link

leobelen commented Dec 21, 2023

Describe the bug
There is no clear way to use async native functions. The only thing that happens right now it that it hangs. If you run https://github.com/SurferTank/boats_async_fn you will see an example.

I see we need to provide a job queue executor, but no examples are available except for https://github.com/boa-dev/boa/blob/90048f2eff99c5699a9ba3d6e4ecb10f05e79105/boa_examples/src/bin/futures.rs but it describes how to use smog. Could we have a similar example using tokio too?

To Reproduce
Steps to reproduce the issue, or JavaScript code that causes this failure.
git clone https://github.com/SurferTank/boats_async_fn;
cd boats_async_fn
cargo r

Expected behavior
the code should run without a hang.

Build environment (please complete the following information):

  • OS: MacOS
  • Version: Sonoma
  • Target triple: aarch64-apple-darwin
  • Rustc version: 1.76.0-nightly (5ac4c8a63 2023-12-20)
@leobelen leobelen added the bug Something isn't working label Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant