Hacker News new | past | comments | ask | show | jobs | submit login

“indefinite” doesn't mean infinite or eternal or forever. It just means “end time unspecified/undetermined”.



Yes, 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".


Indeed, the from the linked ref to 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.


Yes. 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.


The article makes clear that the block end time is not unspecified or undetermined, rather it should be immediate, as the queue still has data.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: