-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Open
Labels
multithreadingBase.Threads and related functionalityBase.Threads and related functionality
Description
Shouldn't we have a notify(::AsyncCondition) method that just calls uv_async_send, so that Julia threads can notify waiting tasks in the main thread? Currently, notify(Base.AsyncCondition()) gives a MethodError.
It seems like AsyncCondition was only designed for use with external libraries, but it seems potentially useful for Julia threads too. Or is there another mechanism preferred for Julia threads to notify waiting tasks?
(I was wondering about this in the context of a discourse thread about how to notify Julia tasks when MPI requests complete. Since MPI_Wait is thread-safe, you could conceivably achieve this by waiting in an OS thread and then notifying waiting tasks with an AsyncCondition.)
fverdugo
Metadata
Metadata
Assignees
Labels
multithreadingBase.Threads and related functionalityBase.Threads and related functionality