[Haskell-cafe] Re: Timeouts that don't cause data growth.

Simon Marlow marlowsd at gmail.com
Tue Mar 23 17:20:08 EDT 2010


On 23/03/10 17:40, David Leimbach wrote:
> Trying to understand why the code here:
> http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=8823#a8823  exhausts
> memory.
>
> I need to have timeouts in a program I'm writing that will run an
> interactive polling session of some remote resources, and know when to
> give up and handle that error. Unfortunately this code dies pretty
> quickly and produces an -hc  graph like the one attached.
>
> It seems that System.Timeout can't be used for this.  I should note that
> if the code is changed to use an inifnite timeout (-1) that this problem
> doesn't occur. Is this a bug in System.Timeout, or is there something I
> should be doing to keep the data size down?

The leak is caused by the Data.Unique library, and coincidentally it was 
fixed recently.  6.12.2 will have the fix.

Cheers,
	Simon



More information about the Haskell-Cafe mailing list