[Python-ideas] channel (synchronous queue)
anacrolix at gmail.com
Sun Feb 19 01:31:56 CET 2012
Cameron explained this better than I could.
On Feb 19, 2012 3:05 AM, "Antoine Pitrou" <solipsis at pitrou.net> wrote:
> On Sat, 18 Feb 2012 23:38:06 +0800
> Matt Joiner <anacrolix at gmail.com> wrote:
> > Recently (for some) the CSP style of channel has become quite popular
> > in concurrency implementations. This kind of channel allows sends that
> > do not complete until a receiver has actually taken the item. The
> > existing queue.Queue would act like this if it didn't treat a queue
> > size of 0 as infinite capacity.
> > In particular, I find channels to have value when sending data between
> > threads, where it doesn't make sense to proceed until some current
> > item has been accepted. This is useful when items are not purely CPU
> > bound, and so generators are not appropriate.
> What is the point to process the data in another thread, if you are
> going to block on the result anyway?
> Python-ideas mailing list
> Python-ideas at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas