-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
FFI: Errors cannot be thrown after a nonblocking
function call
#18131
Labels
bug
Something isn't working correctly
FFI
Related to Foreign Function Interface APIs
needs investigation
requires further investigation before determining if it is an issue or not
Comments
littledivy
added
bug
Something isn't working correctly
needs investigation
requires further investigation before determining if it is an issue or not
FFI
Related to Foreign Function Interface APIs
labels
Mar 22, 2023
Full reproduction example: https://github.com/roj1512/deno-18131-reproduction |
andreubotella
added a commit
to andreubotella/deno
that referenced
this issue
Mar 25, 2023
Tokio's `spawn_blocking` allows running blocking operations, which in Deno include file I/O and "non-blocking" FFI, in a thread pool separate from the thread running the JS event loop. However, by default, when the tokio runtime is dropped, it will block on the main thread until all such blocking operations have completed. This is a problem, since a non-blocking FFI call might never actually finish, which would keep the Deno process running forever, even if it would otherwise have finished earlier because of an uncaught exception. This change, therefore, sets a time limit of 0.5 seconds to wait for those blocking tasks to finish. Closes denoland#18131.
This seems to be essentially the same issue as #14333 just with different API triggering the behaviour. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working correctly
FFI
Related to Foreign Function Interface APIs
needs investigation
requires further investigation before determining if it is an issue or not
The text was updated successfully, but these errors were encountered: