Skip to content

Instantly share code, notes, and snippets.

@nushio3
Created August 4, 2013 08:50
Show Gist options
  • Save nushio3/6149755 to your computer and use it in GitHub Desktop.
Save nushio3/6149755 to your computer and use it in GitHub Desktop.
threadscope test
import Control.Parallel.Strategies
fib :: Integer -> Integer
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
main = do
let (rx, ry) = runEval $ do
x <- rpar $ fib 38 `seq` (undefined :: Integer)
y <- rpar (fib 40)
return (x,y)
print ry
print rx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment