[Python-ideas] channel (synchronous queue)

Paul Moore p.f.moore at gmail.com
Sun Feb 19 19:08:41 CET 2012

On 19 February 2012 18:01, Sturla Molden <sturla at molden.no> wrote:
> It is ~20 lines
> of trivial code with objects already in the standard library. Well, one
> could say the same thing about a queue too (it's just deque and a lock), but
> it is very useful and commonly used, so there is a difference.

FWIW, I wouldn't have got this code right if I'd tried to write it.
I'd have missed a lock or something. So it's possible that having it
in the standard library avoids people like me writing buggy
implementations. On the other hand, I can't imagine ever needing to
use a channel object like this, so it would probably be worth having
some real-world use cases to justify it.


More information about the Python-ideas mailing list