def closed(self, code, reason=None):
"""
Puts a :exc:`StopIteration` as a message into the
`messages` queue.
"""
# When the connection is closed, put a StopIteration
# on the message queue to signal there's nothing left
# to wait for
self.messages.put(StopIteration)
评论列表
文章目录