summaryrefslogtreecommitdiff
path: root/Assistant/Types/NamedThread.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-01-26 14:14:32 +1100
committerGravatar Joey Hess <joey@kitenet.net>2013-01-26 14:14:32 +1100
commit44d7913686ccfef4e6cbd0fdc2b5611aa944ec70 (patch)
treeb8343b59f6730ff31fb7b88ffc11e13073d88c8e /Assistant/Types/NamedThread.hs
parent28eb1f598b1f494b6de815593fa8bfb9aaaeb250 (diff)
use async to track and manage threads
Diffstat (limited to 'Assistant/Types/NamedThread.hs')
-rw-r--r--Assistant/Types/NamedThread.hs32
1 files changed, 0 insertions, 32 deletions
diff --git a/Assistant/Types/NamedThread.hs b/Assistant/Types/NamedThread.hs
deleted file mode 100644
index 0e122c097..000000000
--- a/Assistant/Types/NamedThread.hs
+++ /dev/null
@@ -1,32 +0,0 @@
-{- git-annex assistant named threads.
- -
- - Copyright 2012 Joey Hess <joey@kitenet.net>
- -
- - Licensed under the GNU GPL version 3 or higher.
- -}
-
-module Assistant.Types.NamedThread (
- ThreadName,
- NamedThread(..),
- debug,
- notice,
-) where
-
-import Common.Annex
-import Assistant.Monad
-
-import System.Log.Logger
-
-type ThreadName = String
-data NamedThread = NamedThread ThreadName (Assistant ())
-
-debug :: [String] -> Assistant ()
-debug = logaction debugM
-
-notice :: [String] -> Assistant ()
-notice = logaction noticeM
-
-logaction :: (String -> String -> IO ()) -> [String] -> Assistant ()
-logaction a ws = do
- name <- getAssistant threadName
- liftIO $ a name $ unwords $ (name ++ ":") : ws