On 29/04/20 2:12 pm, Eric Snow wrote:
One of the main inspirations for the
proposed channels is CSP (and somewhat relatedly, my in-depth
experience with Go).  Channels are more than just a thread-safe data
transport between interpreters.

It's a while since I paid attention to the fine details
of CSP. I'll have to do some research on that.

Furthermore, IMHO "release" is better at communicating the
per-interpreter nature than "close".

Channels are a similar enough concept to pipes that I think
it would be confusing to have "close" mean "close for all
interpreters". Everyone understands that "closing" a pipe
only means you're closing your reference to one end of it,
and they will probably assume closing a channel means the
same.

Maybe it would be better to have a different name such as
"destroy" for a complete shutdown.

With pipes the
main difference is how many actors are involved.  Pipes involve one
sender and one receiver, right?

Not necessarily. Mostly they're used that way, but there's
nothing to stop multiple processes having a handle on the
reading or writing end of a pipe simultaneously. Of course
you have to be careful about how you interleave the reads
and writes if you do that.

--
Greg
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PTI5W4SYNV4C73D3XJGOQCFGGL6EVLUI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to