[project @ 2004-10-06 23:45:37 by dons]
[ghc-base.git] / GHC / Conc.lhs
index 2a24fa5..2abc28e 100644 (file)
@@ -14,7 +14,7 @@
 -- 
 -----------------------------------------------------------------------------
 
-#include "config.h"
+#include "ghcconfig.h"
 module GHC.Conc
        ( ThreadId(..)
 
@@ -216,7 +216,7 @@ takeMVar (MVar mvar#) = IO $ \ s# -> takeMVar# mvar# s#
 -- 'putMVar' will wait until it becomes empty.
 --
 -- If several threads are competing to fill the same 'MVar', one is
--- chosen to continue at random with the 'MVar' becomes empty.
+-- chosen to continue at random when the 'MVar' becomes empty.
 putMVar  :: MVar a -> a -> IO ()
 putMVar (MVar mvar#) x = IO $ \ s# ->
     case putMVar# mvar# x s# of
@@ -271,13 +271,17 @@ specified file descriptor is available for reading (just like select).
 @threadWaitWrite@ is similar, but for writing on a file descriptor.
 
 \begin{code}
--- |The 'threadDelay' operation will cause the current thread to
--- suspend for a given number of microseconds (GHC only).
+-- | Suspends the current thread for a given number of microseconds
+-- (GHC only).
+--
+-- Note that the resolution used by the Haskell runtime system's
+-- internal timer is 1\/50 second, and 'threadDelay' will round its
+-- argument up to the nearest multiple of this resolution.
+--
+-- There is no guarantee that the thread will be rescheduled promptly
+-- when the delay has expired, but the thread will never continue to
+-- run /earlier/ than specified.
 --
--- Note that the resolution
--- used by the Haskell runtime system\'s internal timer together with the
--- fact that the thread may take some time to be rescheduled after the
--- time has expired, means that the accuracy is more like 1\/50 second.
 threadDelay :: Int -> IO ()
 
 -- | Block the current thread until data is available to read on the