Proposal: replace readMVar with atomicReadMVar, breaking BC

Ian Lynagh ian at
Wed Jul 10 22:25:42 CEST 2013

On Wed, Jul 10, 2013 at 02:20:14AM -0700, Edward Z. Yang wrote:
> The general feeling Simon and I have is that everyone really wanted
> to make believe readMVar was atomicReadMVar, and so maybe we should
> break BC and make readMVar do the right thing.

I don't think this breaks backwards compatibility. The haddocks say:


    No thread can be blocked indefinitely on an MVar unless another
    thread holds that MVar indefinitely. One usual implementation of
    this fairness guarantee is that threads blocked on an MVar are
    served in a first-in-first-out fashion, but this is not guaranteed
    in the semantics.

Ian Lynagh, Haskell Consultant
Well-Typed LLP,

More information about the Libraries mailing list