imj-base-0.1.0.2: Game engine with geometry, easing, animated text, delta rendering.

Safe HaskellNone
LanguageHaskell2010

Imj.Threading

Contents

Synopsis

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.