From 8557ebbf1af0fa297db4bd3ee30d7c6e289fdca7 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 19 May 2011 15:46:30 +0100 Subject: [PATCH] docs: note strict sequential ordering of MVar operations --- Control/Concurrent/MVar.hs | 7 +++++++ 1 file changed, 7 insertions(+) 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. -- 1.7.10.4