You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 22, 2021. It is now read-only.
I have a multi-threaded application, where one thread runs an event loop. If another thread calls uv_async_send, under what conditions will event loop thread wake up and trigger the callback?
Asking because I will need to block until the callback has actually executed, and need to know what sort of guarantees there are on what will wake it up. I could not find any guarantees in the docs.
The text was updated successfully, but these errors were encountered:
"Needs to block" is kind of ambiguous but I take it to mean the waker thread blocks until it gets an answer from the event loop thread?
The short answer is "always", provided you call uv_run(), your code returns control to the event loop (i.e., no busy loops), and you keep the uv_async_t handle open.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a multi-threaded application, where one thread runs an event loop. If another thread calls
uv_async_send
, under what conditions will event loop thread wake up and trigger the callback?Asking because I will need to block until the callback has actually executed, and need to know what sort of guarantees there are on what will wake it up. I could not find any guarantees in the docs.
The text was updated successfully, but these errors were encountered: