Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
forkFinally :: IO a -> IO b -> IO ThreadId Source
Fork a slave thread with a finalizer action to run a computation on. The finalizer gets executed when the thread dies for whatever reason: due to being killed or an uncaught exception, or a normal termination.
Note the order of arguments:
forkFinally finalizer computation