From: Simon Marlow Date: Thu, 19 May 2011 14:46:30 +0000 (+0100) Subject: docs: note strict sequential ordering of MVar operations X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8557ebbf1af0fa297db4bd3ee30d7c6e289fdca7;p=ghc-base.git docs: note strict sequential ordering of MVar operations --- diff --git a/Control/Concurrent/MVar.hs b/Control/Concurrent/MVar.hs index 3a38294..2fda9f7 100644 --- a/Control/Concurrent/MVar.hs +++ b/Control/Concurrent/MVar.hs @@ -61,6 +61,13 @@ -- in an 'MVar' to the appropriate normal form, or utilize a strict -- MVar provided by the strict-concurrency package. -- +-- * Ordering +-- +-- 'MVar' operations are always observed to take place in the order +-- they are written in the program, regardless of the memory model of +-- the underlying machine. This is in contrast to 'IORef' operations +-- which may appear out-of-order to another thread in some cases. +-- -- * Example -- -- Consider the following concurrent data structure, a skip channel.