Skip to content

Commit

Permalink
Add note about handle leak and fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
batterseapower committed Jun 28, 2009
1 parent 92dfe7b commit a9d3534
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/Test/Framework/Runners/ThreadPool.hs
Expand Up @@ -48,7 +48,12 @@ executeOnPool n actions = do
-- that are unrunnable.
-- See also the ticket where SimonM (semi-cryptically) explains this:
-- http://hackage.haskell.org/trac/ghc/ticket/3291
stablePtr <- myThreadId >>= newStablePtr
--
-- NB: this actually leaks stable pointers. We could prevent this by making
-- takeWhileWorkersExist do |unsafePerformIO newStablePtr| when returning the
-- lazily-demanded tail of the list, but its a bit of a pain. For now, just
-- grit our teeth and accept the leak.
_stablePtr <- myThreadId >>= newStablePtr

-- Return the results generated by the worker threads lazily and in
-- the same order as we got the inputs
Expand Down

0 comments on commit a9d3534

Please sign in to comment.