limited-scope retry?

Bulat Ziganshin bulatz at HotPOP.com
Thu Apr 21 16:00:28 EDT 2005


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:bulatz at HotPOP.com





More information about the Glasgow-haskell-users mailing list