3 ms·
“indefinite” doesn't mean infinite or eternal or forever. It just means “end time unspecified/undetermined”.
by Timwi 3y ago
“indefinite” doesn't mean infinite or eternal or forever. It just means “end time unspecified/undetermined”.
- karmakaze 3y agoYes. Similarly MySQL will report as deadlocks when transactions are not in a deadly embrace but also in cases where A wants a lock held by B, and B (has for some time) wants a lock held by C, and C is just being slow not needing any more locks.
- ReleaseCandidat 3y agoYes, but this is irrelevant, as the actual definition is in the article: A thread that is blocked on a TVar is considered blocked indefinitely if there is no reference [the GC "sees"] to that TVar from a running thread. Edit: "GC" not "GHC".
- deleted 3y ago[deleted]
- Amorymeltzer 3y agoIndeed, the from the linked ref to BlockedIndefinitelyOnSTM: <https://hackage.haskell.org/package/base-4.19.0.0/docs/Control-Exception.html#t:BlockedIndefinitelyOnSTM https://hackage.haskell.org/package/base-4.19.0.0/docs/Contr...> >The thread is waiting to retry an STM transaction, but there are no other references to any TVars involved, so it can't ever continue. But yes, presumably a different word would've been better.
- explaininjs 3y agoThe article makes clear that the block end time is not unspecified or undetermined, rather it should be immediate, as the queue still has data.