thread to send Messages over the wire.
def thread_sender(self):
origin: Gateway
where:
function source:
def thread_sender(self):
""" thread to send Messages over the wire. """
try:
from sys import exc_info
while 1:
msg = self._outgoing.get()
try:
if msg is None:
self.io.close_write()
break
msg.writeto(self.io)
except:
excinfo = exc_info()
self.traceex(excinfo)
if msg is not None:
msg.post_sent(self, excinfo)
raise
else:
self.trace('sent -> %r' % msg)
msg.post_sent(self)
finally:
self.trace('leaving %r' % threading.currentThread())