on master help sign in
removing unnecessary trailing white spaces.
commit0edb0e52ef0d7e82efd70e839068cd5fd24c7900 authorKazu Yamamoto <kazu@iij.ad.jp> dateThu 14 Jul 2016, 15:48 (10 years ago) parent777ee2c
1 file changed+8−8
auto-update/Control/Reaper.hs+8−8
auto-update/Control/Reaper.hs+8−8
@@ -5,7 +5,7 @@
55-- threads. These threads will automatically spawn and die based on the
66-- presence of a workload to process on. Example uses include:
77--
8−-- * Killing long-running jobs
8+-- * Killing long-running jobs
99-- * Closing unused connections in a connection pool
1010-- * Pruning a cache of old items (see example below)
1111--
@@ -214,16 +214,16 @@ mkListAction f =
214214 go front' xs
215215
216216-- $example1
217−-- In this example code, we use a 'Data.Map.Strict.Map' to cache fibonacci numbers, and a 'Reaper' to prune the cache.
217+-- In this example code, we use a 'Data.Map.Strict.Map' to cache fibonacci numbers, and a 'Reaper' to prune the cache.
218218--
219−-- The @main@ function first creates a 'Reaper', with fields to initialize the
219+-- The @main@ function first creates a 'Reaper', with fields to initialize the
220220-- cache ('reaperEmpty'), add items to it ('reaperCons'), and prune it ('reaperAction').
221−-- The reaper will run every two seconds ('reaperDelay'), but will stop running while
221+-- The reaper will run every two seconds ('reaperDelay'), but will stop running while
222222-- 'reaperNull' is true.
223223--
224−-- @main@ then loops infinitely ('Control.Monad.forever'). Each second it calculates the fibonacci number
225−-- for a value between 30 and 34, first trying the cache ('reaperRead' and 'Data.Map.Strict.lookup'),
226−-- then falling back to manually calculating it (@fib@)
224+-- @main@ then loops infinitely ('Control.Monad.forever'). Each second it calculates the fibonacci number
225+-- for a value between 30 and 34, first trying the cache ('reaperRead' and 'Data.Map.Strict.lookup'),
226+-- then falling back to manually calculating it (@fib@)
227227-- and updating the cache with the result ('reaperAdd')
228228--
229229-- @clean@ simply removes items cached for more than 10 seconds.
@@ -276,4 +276,4 @@ mkListAction f =
276276-- currentTime <- 'Data.Time.Clock.getCurrentTime'
277277-- let pruned = Map.'Data.Map.Strict.filter' (\\(_, createdAt) -> currentTime \`diffUTCTime\` createdAt < 10.0) oldMap
278278-- return (\\newData -> Map.'Data.Map.Strict.union' pruned newData)
279−-- @
279+-- @