on master help sign in
Merge pull request #732 from crockeea/memleakfix

Added missing bang, which seems to resolve the memory leak in #728

commit8f9857b213dccd022e5bc921b1486fc20deb4bb5 authorMichael Snoyman <michael@snoyman.com> dateWed 20 Feb 2019, 11:42 (8 years ago) parent4ec6eda28b688e
3 files changed+8−3
auto-update/ChangeLog.md+5 auto-update/Control/Reaper.hs+2−2 auto-update/auto-update.cabal+1−1
auto-update/ChangeLog.md+5
@@ -1,3 +1,8 @@
1+## 0.1.4.2
2+
3+* [#732](https://github.com/yesodweb/wai/pull/732):
4+ Fixed memory leak in `reaperAdd` function.
5+
16## 0.1.4.1
27
38* [#693](https://github.com/yesodweb/wai/pull/693):
auto-update/Control/Reaper.hs+2−2
@@ -113,7 +113,7 @@ data Reaper workload item = Reaper {
113113
114114-- | State of reaper.
115115data State workload = NoReaper -- ^ No reaper thread
116− | Workload workload -- ^ The current jobs
116+ | Workload !workload -- ^ The current jobs
117117
118118-- | Create a reaper addition function. This function can be used to add
119119-- new items to the workload. Spawning of reaper threads will be handled
@@ -154,7 +154,7 @@ add settings@ReaperSettings{..} stateRef tidRef item =
154154 next <- atomicModifyIORef' stateRef cons
155155 next
156156 where
157− cons NoReaper = let !wl = reaperCons item reaperEmpty
157+ cons NoReaper = let wl = reaperCons item reaperEmpty
158158 in (Workload wl, spawn settings stateRef tidRef)
159159 cons (Workload wl) = let wl' = reaperCons item wl
160160 in (Workload wl', return ())
auto-update/auto-update.cabal+1−1
@@ -1,5 +1,5 @@
11name: auto-update
2−version: 0.1.4.1
2+version: 0.1.4.2
33synopsis: Efficiently run periodic, on-demand actions
44description: API docs and the README are available at <http://www.stackage.org/package/auto-update>.
55homepage: https://github.com/yesodweb/wai