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

Feature request: setTimeout #135

Open
wch opened this issue Dec 20, 2021 · 0 comments
Open

Feature request: setTimeout #135

wch opened this issue Dec 20, 2021 · 0 comments

Comments

@wch
Copy link

wch commented Dec 20, 2021

I know that setTimeout is not implemented in the V8 engine itself; it is expected that the runtime which embeds V8 would implement setTimeout. In the case of this R package, it would be very useful to have setTimeout, since many JS libraries expect it to be present.

As for implementation, here are some possibilities:

  • The later package could be used. A call to setTimeout() could use later's C API to schedule a callback that runs in V8.
  • It would be even better if V8 could be run in a separate thread; when async code resolves, it could post messages back to the main R thread, again using the later package.
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

1 participant