Skip to content

Instantly share code, notes, and snippets.

@mwotton
Created May 11, 2018 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwotton/96151d780c7f8f4a374bacb0bca3485e to your computer and use it in GitHub Desktop.
Save mwotton/96151d780c7f8f4a374bacb0bca3485e to your computer and use it in GitHub Desktop.
set ➜ ~ ./test2 &
[1] 22997
set ➜ ~ kill 22997
[1] + 22997 terminated ./test2
set ➜ ~ cat test2.hs
import Control.Exception
import Control.Concurrent
main :: IO ()
main = bracket (return ()) (\_ -> putStrLn "come to collect") (\_ -> threadDelay 30000000)
set ➜ ~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment