diff options
author | Benjamin Barenblat <bbarenblat@gmail.com> | 2022-01-19 12:58:54 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbarenblat@gmail.com> | 2022-01-19 13:31:02 -0500 |
commit | 44df82dcbf72d01d2bbb6c0afacff329ca749854 (patch) | |
tree | 2619d3890a9e7e532f0ad19fd5fb4e6579bd0db7 /Assistant/NamedThread.hs | |
parent | 0ded71e9a53b1482019aedaa194e913d3a021c8d (diff) |
Eliminate Data.Map.insertWith'
containers-0.6 removed insertWith' in favor of the Data.Map.Strict API.
Switch to the new API where appropriate.
Diffstat (limited to 'Assistant/NamedThread.hs')
-rw-r--r-- | Assistant/NamedThread.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Assistant/NamedThread.hs b/Assistant/NamedThread.hs index 090a3a7cd..ae7375a27 100644 --- a/Assistant/NamedThread.hs +++ b/Assistant/NamedThread.hs @@ -1,6 +1,7 @@ {- git-annex assistant named threads. - - Copyright 2012 Joey Hess <id@joeyh.name> + - Copyright 2022 Benjamin Barenblat <bbarenblat@gmail.com> - - Licensed under the GNU GPL version 3 or higher. -} @@ -20,7 +21,7 @@ import Utility.NotificationBroadcaster import Control.Concurrent import Control.Concurrent.Async -import qualified Data.Map as M +import qualified Data.Map.Strict as M import qualified Control.Exception as E #ifdef WITH_WEBAPP @@ -57,7 +58,7 @@ startNamedThread urlrenderer (NamedThread afterstartupsanitycheck name a) = aid <- liftIO $ runner $ d { threadName = name } restart <- asIO $ startNamedThread urlrenderer (NamedThread False name a) modifyDaemonStatus_ $ \s -> s - { startedThreads = M.insertWith' const name (aid, restart) (startedThreads s) } + { startedThreads = M.insert name (aid, restart) (startedThreads s) } runmanaged first d = do aid <- async $ runAssistant d $ do void first |