
10 Jul
2013
10 Jul
'13
8:24 p.m.
+1 definitely.
Tom
El Jul 10, 2013, a las 13:07, "Edward Z. Yang"
Excerpts from Tom Murphy's message of Wed Jul 10 05:45:36 -0700 2013:
Is there a reason why as I programmer I should prefer the non-FIFO semantics, or is it implemented that way for efficiency?
Timely delivery of reads. Ordinary takeMVar is FIFO for fairness reasons: so long as an MVar is not held indefinitely, all takeMVars will be serviced. For reads, we can service them immediately without worrying about fairness, since they don't block anyone.
It is literally trivial to do either FIFO and non-FIFO implementation wise.
Edward