Commit ede9277d authored by Jeremy Hylton's avatar Jeremy Hylton

Add flush method.

parent 041bb90c
......@@ -451,6 +451,13 @@ class Connection(smac.SizedMessageAsyncConnection):
finally:
self.replies_cond.release()
def flush(self):
"""Invoke poll() until the output buffer is empty."""
if __debug__:
self.log("flush")
while self.writable():
self.poll()
def poll(self):
"""Invoke asyncore mainloop to get pending message out."""
if __debug__:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment