This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap".

The branch, master has been updated
       via  c93ddeb6cdd037e684d7b9a624f5b4957f748647 (commit)
      from  5fa86788d67ff4caace8e892c3ac86532a2fd639 (commit)


Summary of changes:
 src/Snap/Loader/Hint.hs |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c93ddeb6cdd037e684d7b9a624f5b4957f748647
Author: Carl Howells <[email protected]>
Date:   Wed Jun 30 21:53:10 2010 -0700

    Minor cleanups to Snap.Loader.Hint

diff --git a/src/Snap/Loader/Hint.hs b/src/Snap/Loader/Hint.hs
index b0e5b5b..1e2bf82 100644
--- a/src/Snap/Loader/Hint.hs
+++ b/src/Snap/Loader/Hint.hs
@@ -135,11 +135,11 @@ format (WontCompile errs) =
 -- There will be at least the passed-in 'NominalDiffTime' delay
 -- between the finish of one execution of the action the start of the
 -- next.  Concurrent calls to the wrapper, and calls within the delay
--- period, end up with the same calculated value for a.
+-- period, end up with the same calculated value returned.
 --
 -- If an exception is raised during the processing of the action, it
--- will be thrown to all waiting threads, for all requests made before
--- the delay time has expired after the exception was raised.
+-- will be thrown to all waiting threads, and for all requests made
+-- before the delay time has expired after the exception was raised.
 protectedActionEvaluator :: NominalDiffTime -> IO a -> IO (IO a)
 protectedActionEvaluator minReEval action = do
     readerContainer <- newMVar []
@@ -154,7 +154,6 @@ protectedActionEvaluator minReEval action = do
                     Right val -> return val
                     Left  e   -> throwIO e
             _ -> do
-                reader <- newEmptyMVar
                 readers <- takeMVar readerContainer
 
                 when (null readers) $ do
@@ -177,6 +176,7 @@ protectedActionEvaluator minReEval action = do
                     return ()
 
                 tid <- myThreadId
+                reader <- newEmptyMVar
                 let pair = (tid, reader)
                     newReaders = pair `seq` (pair : readers)
                 putMVar readerContainer $! newReaders
-----------------------------------------------------------------------


hooks/post-receive
-- 
snap
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap

Reply via email to