Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
import Control.Concurrent.STM
test :: Int -> TVar [(Int, Int)] -> IO ()
test 0 t = return ()
test n t = do atomically $ do l <- readTVar t
let l' = (n, n) : l
writeTVar t l'
test (n-1) t
main = do
tv <- newTVarIO []
test 2000000 tv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.