[Haskell-cafe] Implementing tryReadMVar
ekarttun at cs.helsinki.fi
Thu Sep 2 04:00:46 EDT 2004
On 01.09 13:09, Jan-Willem Maessen - Sun Labs East wrote:
> I was, however, curious what use you had in mind where writes were
> racing, but where you nonetheless wanted to perform blind non-blocking
> reads. Such situations are generally fraught with peril. In this
> case, the peril is starvation of the debug thread---which you may or
> may not actually care about.
I was trying to implement safe tryReadChan, which seems to be
very simple with tryReadMVar, without it it seems to suffer
from various concurrency problems.
- Einar Karttunen
More information about the Haskell-Cafe