Permalink
Browse files

Incredibly important ONE CHARACTER fix.

  • Loading branch information...
rrnewton committed Mar 28, 2013
1 parent 2a6c656 commit 0618d60ccf9d5ef1e91e7e496e2d9712b7e07aa7
Showing with 5 additions and 4 deletions.
  1. +2 −1 haskell-prototype/BFS.hs
  2. +3 −3 haskell-prototype/LVarTracePure.hs
View
@@ -134,7 +134,8 @@ verbose :: Bool
verbose = checkEnv "VERBOSE" False
dbg :: Bool
dbg = checkEnv "DEBUG" False
-- dbg = checkEnv "DEBUG" False
dbg = False -- Let it inline, DCE.
main :: IO ()
main = do
@@ -295,11 +295,11 @@ sched queue t = loop t
-- potentially more expensive than in the plain IVar case.)
-- e <- readIORef ref
let thisCB x =
trace ("... LVar blocked, thresh attempted "++show(hashStableName$ unsafePerformIO$ makeStableName x))
-- trace ("... LVar blocked, thresh attempted "++show(hashStableName$ unsafePerformIO$ makeStableName x))
fmap cont $ thresh x
r <- atomicModifyIORef ref $ \ st@(LVarContents a ls) ->
case thresh a of
Just b -> trace ("... LVar get, thresh passed ")
Just b -> -- trace ("... LVar get, thresh passed ")
(st, loop (cont b))
Nothing -> (LVarContents a (thisCB:ls), reschedule queue)
r
@@ -322,7 +322,7 @@ sched queue t = loop t
(ls',woken) = loop ls [] []
loop [] f w = (f,w)
loop (hd:tl) f w =
case hd new of
case hd new' of

This comment has been minimized.

Show comment
Hide comment
@lkuper

lkuper Mar 28, 2013

Member

Holy cow.

@lkuper

lkuper Mar 28, 2013

Member

Holy cow.

Just trc -> loop tl f (trc:w)
Nothing -> loop tl (hd:f) w
-- Callbacks invoked:

0 comments on commit 0618d60

Please sign in to comment.