summaryrefslogtreecommitdiff
path: root/Utility/ThreadScheduler.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/ThreadScheduler.hs')
-rw-r--r--Utility/ThreadScheduler.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Utility/ThreadScheduler.hs b/Utility/ThreadScheduler.hs
index c3e871c..dbb6cb3 100644
--- a/Utility/ThreadScheduler.hs
+++ b/Utility/ThreadScheduler.hs
@@ -53,8 +53,11 @@ unboundDelay time = do
{- Pauses the main thread, letting children run until program termination. -}
waitForTermination :: IO ()
waitForTermination = do
+#ifdef mingw32_HOST_OS
+ runEvery (Seconds 600) $
+ void getLine
+#else
lock <- newEmptyMVar
-#ifndef mingw32_HOST_OS
let check sig = void $
installHandler sig (CatchOnce $ putMVar lock ()) Nothing
check softwareTermination
@@ -62,8 +65,8 @@ waitForTermination = do
whenM (queryTerminal stdInput) $
check keyboardSignal
#endif
-#endif
takeMVar lock
+#endif
oneSecond :: Microseconds
oneSecond = 1000000