Re: [Haskell-cafe] Number of outstanding messages in Chan or TChan

2005-12-06 Thread Joel Reymont
On Dec 6, 2005, at 1:47 PM, Bulat Ziganshin wrote: either 1) use MVars/TMVars instead of Channels. in any case your logging thread must consume data not slower than other channels produce then. in fact, using Chan have meaning only to smooth temporary speed differences between different threads.

Re: [Haskell-cafe] Number of outstanding messages in Chan or TChan

2005-12-06 Thread Joel Reymont
I must eat crow :-(. Moving the thread and logger mailboxes from TChan to TMVar reduced memory consumption by an order of magnitude. I found my space leak. Moving serialization from [Word8] to unboxed arrays did not hurt either. On Dec 6, 2005, at 1:47 PM, Bulat Ziganshin wrote: either 1)

Re: [Haskell-cafe] Number of outstanding messages in Chan or TChan

2005-12-06 Thread Bulat Ziganshin
Hello Joel, Tuesday, December 06, 2005, 12:54:57 PM, you wrote: JR> Is there a way to check the number of outstanding messages in a Chan JR> or TChan? either 1) use MVars/TMVars instead of Channels. in any case your logging thread must consume data not slower than other channels produce then.

Re: [Haskell-cafe] Number of outstanding messages in Chan or TChan

2005-12-06 Thread Tomasz Zielonka
On Tue, Dec 06, 2005 at 09:54:57AM +, Joel Reymont wrote: > Is there a way to check the number of outstanding messages in a Chan > or TChan? > > I suspect my problem is related to not reading messages fast enough > and I'd like to troubleshoot this by scanning my channels once every > fe