diff options
author | Joey Hess <joey@kitenet.net> | 2013-12-10 15:46:12 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-12-10 15:46:12 -0400 |
commit | a0aab76ae762614041720dd55d63ed3e0b7c1c94 (patch) | |
tree | 03a7aeb1a01ab7428565554f06a8adae0e190311 /Utility/ThreadScheduler.hs | |
parent | 7822ea69246fb0415c0794bcab721a2111735496 (diff) | |
download | git-repair-a0aab76ae762614041720dd55d63ed3e0b7c1c94.tar.gz |
sync from git-annex
Diffstat (limited to 'Utility/ThreadScheduler.hs')
-rw-r--r-- | Utility/ThreadScheduler.hs | 7 |
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 |