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

Joel Reymont joelr1 at gmail.com
Tue Dec 6 09:52:03 EST 2005


Well, I do need to have access to all those thread handles.

On Dec 6, 2005, at 2:43 PM, Maarten Hazewinkel wrote:

> I apologise if this doesn't make sense (I'm fairly new to Haskell),  
> but
> wouldn't a single shared counter be sufficient for this?
>
> Increment for each child launched.
> Decrement by each finished child.
> When it's back down to zero, you're done.

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list