Skip to content
Browse files

Clarify multi-threaded behavior of Gen

 fixes #38
  • Loading branch information...
1 parent 5c7b1a4 commit b62e32e5e9a07369b8144320969740781a99c060 @Shimuuar Shimuuar committed Apr 2, 2016
Showing with 3 additions and 1 deletion.
  1. +3 −1 System/Random/MWC.hs
View
4 System/Random/MWC.hs
@@ -310,7 +310,9 @@ wordsToDouble x y = (fromIntegral u * m_inv_32 + (0.5 + m_inv_53) +
v = fromIntegral y :: Int32
{-# INLINE wordsToDouble #-}
--- | State of the pseudo-random number generator.
+-- | State of the pseudo-random number generator. It uses mutable
+-- state so same generator shouldn't be used from the different
+-- threads simultaneously.
newtype Gen s = Gen (M.MVector s Word32)
-- | A shorter name for PRNG state in the 'IO' monad.

0 comments on commit b62e32e

Please sign in to comment.
Something went wrong with that request. Please try again.