thread to read and handle Messages half-sync-half-async.
def thread_receiver(self):
origin: Gateway
where:
function source:
def thread_receiver(self):
""" thread to read and handle Messages half-sync-half-async. """
try:
from sys import exc_info
while 1:
try:
msg = Message.readfrom(self.io)
self.trace("received <- %r" % msg)
msg.received(self)
except sysex:
raise
except EOFError:
break
except:
self.traceex(exc_info())
break
finally:
self._outgoing.put(None)
self.channelfactory._finished_receiving()
self.trace('leaving %r' % threading.currentThread())