Rules for use of unsafeThaw...

Jan-Willem Maessen jmaessen at
Thu Nov 3 20:26:25 EST 2005

On Nov 3, 2005, at 12:16 PM, Bulat Ziganshin wrote:

> Hello Jan-Willem,
> Thursday, November 03, 2005, 8:08:09 PM, you wrote:
> JWM> I've recently been experimenting with unsafeFreeze/unsafeThaw in
> JWM> GHC.  Judicious use of these functions vastly reduces GC  
> overhead in
> JWM> Data.HashTable.  However, a slightly mis-timed GC will cause the
> JWM> whole mess to crash.
> i had (for another reason) proposal for adding disableGC/enableGC
> primitives to GHC. Simon Marlow says that it is in principle possible,
> although is not easy

I'd rather the performance problems with tracing of large mutable  
objects were fixed, frankly.  And I rather suspect I can Do The Right  
thing here without enabling/disabling GC (by swapping out refs and  
swapping them back in again, if need be).

But there are definitely times this'd be interesting.


> -- 
> Best regards,
>  Bulat                            mailto:bulatz at

More information about the Glasgow-haskell-users mailing list