auto-update 0.2.0 → 0.2.1
raw patch · 5 files changed
+13/−5 lines, 5 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +4/−0
- Control/AutoUpdate.hs +3/−2
- Control/Debounce/Internal.hs +3/−2
- Control/Reaper.hs +2/−0
- auto-update.cabal +1/−1
ChangeLog.md view
@@ -1,5 +1,9 @@ # ChangeLog for auto-update +## 0.2.1++* Labeling threads.+ ## 0.2.0 * Creating Reaper.Internal to export Reaper constructor.
Control/AutoUpdate.hs view
@@ -65,6 +65,7 @@ import Control.Monad (void) import Data.IORef (newIORef, readIORef, writeIORef) import Data.Maybe (fromMaybe)+import GHC.Conc.Sync (labelThread) -- | Default value for creating an 'UpdateSettings'. --@@ -172,7 +173,7 @@ -- Note that since we throw away the ThreadId of this new thread and never -- calls myThreadId, normal async exceptions can never be thrown to it, -- only RTS exceptions.- mask_ $ void $ forkIO $ fillRefOnExit $ do+ tid <- mask_ $ forkIO $ fillRefOnExit $ do -- This infinite loop makes up out worker thread. It takes an a -- responseVar value where the next value should be putMVar'ed to for -- the benefit of any requesters currently blocked on it.@@ -200,7 +201,7 @@ -- Kick off the loop, with the initial responseVar0 variable. loop responseVar0 Nothing-+ labelThread tid "AutoUpdate" return $ do mval <- readIORef currRef case mval of
Control/Debounce/Internal.hs view
@@ -18,6 +18,7 @@ ) import Control.Exception (SomeException, handle, mask_) import Control.Monad (forever, void)+import GHC.Conc.Sync (labelThread) -- | Settings to control how debouncing should work. --@@ -85,7 +86,7 @@ mkDebounceInternal :: MVar () -> (Int -> IO ()) -> DebounceSettings -> IO (IO ()) mkDebounceInternal baton delayFn (DebounceSettings freq action edge) = do- mask_ $ void $ forkIO $ forever $ do+ tid <- mask_ $ forkIO $ forever $ do takeMVar baton case edge of Leading -> do@@ -96,7 +97,7 @@ -- Empty the baton of any other activations during the interval void $ tryTakeMVar baton ignoreExc action-+ labelThread tid "Denounce" return $ void $ tryPutMVar baton () ignoreExc :: IO () -> IO ()
Control/Reaper.hs view
@@ -46,6 +46,7 @@ import Control.Exception (mask_) import Control.Reaper.Internal import Data.IORef (IORef, newIORef, readIORef, writeIORef)+import GHC.Conc.Sync (labelThread) -- | Settings for creating a reaper. This type has two parameters: -- @workload@ gives the entire workload, whereas @item@ gives an@@ -181,6 +182,7 @@ -> IO () spawn settings stateRef tidRef = do tid <- forkIO $ reaper settings stateRef tidRef+ labelThread tid "Reaper" writeIORef tidRef $ Just tid reaper
auto-update.cabal view
@@ -1,5 +1,5 @@ name: auto-update-version: 0.2.0+version: 0.2.1 synopsis: Efficiently run periodic, on-demand actions description: API docs and the README are available at <http://www.stackage.org/package/auto-update>. homepage: https://github.com/yesodweb/wai