
6 Dec
2005
6 Dec
'05
5 a.m.
On Tue, Dec 06, 2005 at 09:54:57AM +0000, 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 few seconds and dumping statistics.
I would create a new ADT consisting of a TChan and TVar Int, increased on writeTChan and decreased on readTChan. Indeed, not reading messages fast enough can cause something similar to space leak. Perhaps use a bounded TChan, it should be quite easy to do in STM. Best regards Tomasz -- I am searching for a programmer who is good at least in some of [Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland