Tue Mar  6 06:54:24 PST 2007  Simon Marlow <[EMAIL PROTECTED]>
  * Prevent duplication of unsafePerformIO on a multiprocessor
  Fixes #986.  The idea is to add a new operation
  
    noDuplicate :: IO ()
  
  it is guaranteed that if two threads have executed noDuplicate, then
  they are not duplicating any computation.
  
  We now provide two new unsafe operations:
  
  unsafeDupablePerformIO    :: IO a -> a
  unsafeDupableInterleaveIO :: IO a -> IO a
  
  which are equivalent to the old unsafePerformIO and unsafeInterleaveIO
  respectively.  The new versions of these functions are defined as:
  
  unsafePerformIO    m = unsafeDupablePerformIO (noDuplicate >> m)
  unsafeInterleaveIO m = unsafeDupableInterleaveIO (noDuplicate >> m)

    M ./GHC/IOBase.lhs -12 +41
_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to