Safe Haskell | None |
---|---|
Language | Haskell2010 |
- runAndWaitForTermination :: IO () -> IO Termination
- data Termination
- setupCapabilities :: IO ()
Threads
We use a separate thread to run the game, to be able to catch Ctrl-C related exception, and reset console settings before quitting.
It doesn't seem to always work, maybe we should use this approach instead.
runAndWaitForTermination :: IO () -> IO Termination Source #
Runs an IO action in a separate thread, and waits for it to finish, returning its result.
data Termination Source #
Was the thread termination normal or due to an error?
setupCapabilities :: IO () Source #
Sets the number of capabilities to half the number of processors. Not used at the moment since we don't use parallelism too much.