Hello Abraham,

Thursday, April 21, 2005, 6:47:27 PM, you wrote:

AE> Suppose that a program using the Control.Concurrent.STM module had a
AE> producer/consumer setup - one thread writing to a channel, the other
AE> thread reading from the channel.  It seems natural to want a function
AE> that the producer can call that will block until the consumer has
AE> finished consuming everything currently in the channel.

i think this is a bad programming technique. it's better to use
another discipline of managing queue. for example, in my program i
just allocate fixed number of buffers and use them to send data over
channel. as a result, channel can't contaion more than this nu,ber of
elements. if you will say more about your GOAL, not particular
decision you made, may be i can suppose you better solution


-- 
Best regards,
 Bulat                            mailto:[EMAIL PROTECTED]



_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to