[Haskell-cafe] STM and `orElse` on a few thousand TMVars

Joel Reymont joelr1 at gmail.com
Tue Dec 6 08:47:27 EST 2005


I'm trying to implement a better waitForChildren from the docs for  
Control.Concurrent.

I would like to know when all the children exit, basically, and I  
thought it would be neat to try to do that with STM.

Is there an advantage to STM here?

	Thanks, Joel

On Dec 6, 2005, at 1:29 PM, Simon Marlow wrote:

> I'm not sure what you're using all those TMVars for, but it sounds  
> like
> it might be better to multiplex them all into a single channel, or
> something.

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list