summaryrefslogtreecommitdiff
path: root/Utility/ThreadScheduler.hs
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-01-02 18:07:10 +0000
committerSean Whitton <spwhitton@spwhitton.name>2020-01-02 18:07:10 +0000
commit1092316ba04116d7ae1d4cdf347804feacef768a (patch)
treefbc819794d4202a4ac778f0f6be57eedef7518dd /Utility/ThreadScheduler.hs
parentd1e0531dd8e8b842349421a898b74b212d2157e8 (diff)
parent50a5a7b101cc9c30a5a04b4c20cbf7f99fcab0ef (diff)
downloadgit-repair-1092316ba04116d7ae1d4cdf347804feacef768a.tar.gz
Merge tag '1.20200102'
tagging package git-repair version 1.20200102
Diffstat (limited to 'Utility/ThreadScheduler.hs')
-rw-r--r--Utility/ThreadScheduler.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/Utility/ThreadScheduler.hs b/Utility/ThreadScheduler.hs
index da05e99..ef69ead 100644
--- a/Utility/ThreadScheduler.hs
+++ b/Utility/ThreadScheduler.hs
@@ -8,7 +8,14 @@
{-# LANGUAGE CPP #-}
-module Utility.ThreadScheduler where
+module Utility.ThreadScheduler (
+ Seconds(..),
+ Microseconds,
+ runEvery,
+ threadDelaySeconds,
+ waitForTermination,
+ oneSecond,
+) where
import Control.Monad
import Control.Concurrent
@@ -18,10 +25,8 @@ import System.Posix.IO
#endif
#ifndef mingw32_HOST_OS
import System.Posix.Signals
-#ifndef __ANDROID__
import System.Posix.Terminal
#endif
-#endif
newtype Seconds = Seconds { fromSeconds :: Int }
deriving (Eq, Ord, Show)
@@ -63,10 +68,8 @@ waitForTermination = do
let check sig = void $
installHandler sig (CatchOnce $ putMVar lock ()) Nothing
check softwareTermination
-#ifndef __ANDROID__
whenM (queryTerminal stdInput) $
check keyboardSignal
-#endif
takeMVar lock
#endif