[Haskell-cafe] Re: Real-time garbage collection for Haskell
Simon Marlow
marlowsd at gmail.com
Fri Mar 5 07:42:00 EST 2010
On 05/03/2010 05:03, wren ng thornton wrote:
> Simon Marlow wrote:
>> So it would be pretty easy to provide something like
>>
>> disableMajorGC, enableMajorGC :: IO ()
>>
>> Of course leaving it disabled too long could be bad, but that's your
>> responsibility.
>
> It seems like it'd be preferable to have an interface like:
>
> withMajorGCDisabled :: IO() -> IO()
>
> or (for some definition of K):
>
> withMajorGCDisabled :: (K -> IO()) -> IO()
Sure, my intention was that you'd build this with the primitives.
> in order to ensure that it always gets turned back on eventually. Of
> course, the latter can be created from the former pair. It's just that
> the former reminds me a bit much of explicit memory management and how
> difficult it is to balance the free()s...
quite!
Cheers,
Simon
More information about the Haskell-Cafe
mailing list