6cc3ae533571eff68f87c4ec5841b6ba9a6533f8cfda1c3f437ab6f9e73991e8

Download raw

Created: 2023-12-19 03:40:10.302489 UTC

Size: 1302

Preview (limited to 512 bytes)

"module Random1283 (main) where\n\nimport Control.Concurrent\nimport Control.Monad\nimport Data.Sequence (Seq, ViewL(..), empty, fromList, viewl, (<|), (|>), (><))\nimport System.Random\n\n-- This test\n\nthreads, samples :: Int\nthreads = 4\nsamples = 5000\n\nmain :: IO ()\nmain = loopTest threads samples\n\nloopTest :: Int -> Int -> IO ()\nloopTest t s = do\n isClean <- testRace t s\n unless isClean $ putStrLn \"race condition!\"\n\ntestRace :: Int -> Int -> IO Bool\ntestRace t s = do\n ref <- liftM (take (t*s) . randoms) getSt"


Casa is a service provided by the Haskell Foundation │ Originally developed by FP Complete