Richard Kiss added the comment:

I agree it's confusing and I apologize for that.

Background:

This multiplexing pattern is used in pycoinnet, a bitcoin client I'm developing 
at <https://github.com/richardkiss/pycoinnet>. The BitcoinPeerProtocol class 
multiplexes protocol messages into multiple asyncio.Queue objects so each 
interested listener can react. An example listener is in 
pycoinnet.helpers.standards.install_pong_manager, which looks for "ping" 
messages and sends "pong" responses. When the peer disconnects, the pong 
manager sees a None (to indicate EOF), and it exits. The return value is 
uninteresting, so no reference to the Task is kept.

My client is in late alpha, and mostly works, but when I tried it on Python 
3.4.0, it stopped working and I narrowed it down to this.

I'm not certain this behaviour is incorrect, but it's definitely different from 
3.3.3, and it seems odd that a GC cycle BEFORE additional references can be 
made would allow it to work.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21163>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to