[mercury-users] channel vs. stream

Michael Day mikeday at yeslogic.com
Wed Dec 18 18:02:58 AEDT 2002


Channels defined in extras/concurrency/channel are very similar to
streams, except that they are infinite and reading from one will always
return a value, if it does not block indefinitely.

If channels could be closed, after which no further writes are possible
and reads return yes(T) until all the buffered items have been read and no
forever afterwards, would this unnecessarily complicate the interface? Is
the infinite nature of channels an intentional design goal that matches
the way they are used, or just an unintended side effect of implementation
choices?

Michael

--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list