-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
There are several cases where deadlocks will occur if a Queue is used in any Fiber which is killed (ParAff is a common scenario).
read ∷ ∀ a. Queue a → Aff a
read (Queue q) = do
readEnd ← AVar.take q.readEnd
// Kill here leaves readEnd empty
QItem a newRead ← AVar.read readEnd
AVar.put newRead q.readEnd
pure a
Invincibility is not a solution because that will lead to external deadlock problems. I have been long down this road with Aff, and even patched the library to fix a critical temporal issue that will also be at play here. When I am able to share the fix I will.
deniskr
Metadata
Metadata
Assignees
Labels
No labels