[Haskell-cafe] Resource Limits for Haskell
Edward Z. Yang
ezyang at MIT.EDU
Fri Mar 15 22:17:39 CET 2013
Hey folks,
Have you ever wanted to implement this function in Haskell?
-- | Forks a thread, but kills it if it has more than 'limit'
-- bytes resident on the heap.
forkIOWithSpaceLimit :: IO () -> {- limit -} Int -> IO ThreadId
Well, now you can! I have a proposal and set of patches here:
http://hackage.haskell.org/trac/ghc/wiki/Commentary/ResourceLimits
http://hackage.haskell.org/trac/ghc/ticket/7763
There is a lot of subtlety in this space, largely derived from the
complexity of interpreting GHC's current profiling information. Your
questions, comments and suggestions are greatly appreciated!
Cheers,
Edward
More information about the Haskell-Cafe
mailing list