Commit 2f99cdb9 authored by Edward Z. Yang's avatar Edward Z. Yang

Update docs for readMVar/tryReadMVar.

Signed-off-by: Edward Z. Yang's avatarEdward Z. Yang <ezyang@mit.edu>
parent 193e0ee9
...@@ -279,12 +279,16 @@ ...@@ -279,12 +279,16 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
<literal>Control.Concurrent.MVar</literal> has two <literal>Control.Concurrent.MVar</literal> has a new
new functions, <literal>atomicReadMVar</literal> and implementation of <literal>readMVar</literal>, which
<literal>tryAtomicReadMVar</literal>, which fixes a long-standing bug where
implement <literal>readMVar</literal> that cannot be <literal>readMVar</literal> is only atomic if there
affected by other threads. (XXXX we may change the implementation are no other threads running
of <literal>readMVar</literal> to use this.) <literal>putMVar</literal>.
<literal>readMVar</literal> now is atomic, and is
guaranteed to return the value from the first
<literal>putMVar</literal>. There is also a new <literal>tryReadMVar</literal>
which is a non-blocking version.
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment