在Gevent的what's new下,^{}模块下的一个新类^{}:
Queue(0) is now equivalent to an unbound queue and raises DeprecationError. Use gevent.queue.Channel if you need a channel.
我查看了文档页,但是没有关于Channel
是什么或做什么的文档。看看source,它看起来与Queue
相似,但它不是它的子类。Channel
的目的或用途是什么?它是某种特殊的队列吗?在
Tags:
看the code for the pre-1.0 version of Gevent可以告诉你
Channel
是什么(尽管我知道这有点复杂):现在,正如发行说明所指出的,这种行为在gevent1.0中已经改变了,
Queue(0)
不再以这种方式工作:Channel()
就这样了。在您将看到,相应地,
Channel.put
的实现比Queue.put
的实现复杂得多。在注意,“标准
Queue
”指的是the standard library Queue。在相关问题 更多 >
编程相关推荐