[Haskell-cafe] Spurious program crashes

Joel Reymont joelr1 at gmail.com
Mon Nov 21 11:42:33 EST 2005


I'm being quite careful with resources these days. The outstanding  
issues are

1) Crashes on Mac OSX that are not reproduced on Linux, Windows, etc.

2) Some kind of a problem with Chan. getChanContents retrieves things  
smoothly, readChan only does it for the first few lines. Simon? Anyone?

3) Different performance of the logger thread on Mac OSX and Windows.

I'm having thousands of threads write their trace messages to a Chan.  
The logger On Windows I only see the first few lines of output when  
using isEmptyChan/readChan to retrieve values in a loop. On Mac OSX I  
do see smooth output.

On Windows I run out of memory because all the output sent to the  
chan builds up and is never processed. I can process it by replacing  
isEmptyChan/readChan with getChanContents but then my logger thread  
hangs forever (right semantics) and hangs everything else that waits  
for the logger thread to check an MVar and exit.

On Nov 21, 2005, at 4:34 PM, Keean Schupke wrote:

> One thing, which I am sure you must have got right, but which  
> burned me, is that you must explicitly free enitities created by  
> FFI calls.

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list