[svn r45549] fix a bug that servemain() wouldn't actually
try to join threads at exit because of a (hidden) attribute error. --HG-- branch : trunk
This commit is contained in:
parent
62634136b9
commit
2371fb16fa
|
@ -50,7 +50,7 @@ class GatewayCleanup:
|
||||||
debug.flush()
|
debug.flush()
|
||||||
for gw in self._activegateways.keys():
|
for gw in self._activegateways.keys():
|
||||||
gw.exit()
|
gw.exit()
|
||||||
gw.join() # should work as well
|
#gw.join() # should work as well
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# Base Gateway (used for both remote and local side)
|
# Base Gateway (used for both remote and local side)
|
||||||
|
@ -141,15 +141,15 @@ class Gateway(object):
|
||||||
self._channelfactory._finished_receiving()
|
self._channelfactory._finished_receiving()
|
||||||
self._trace('leaving %r' % threading.currentThread())
|
self._trace('leaving %r' % threading.currentThread())
|
||||||
|
|
||||||
def _send(self, msg):
|
|
||||||
from sys import exc_info
|
from sys import exc_info
|
||||||
|
def _send(self, msg):
|
||||||
if msg is None:
|
if msg is None:
|
||||||
self._io.close_write()
|
self._io.close_write()
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
msg.writeto(self._io)
|
msg.writeto(self._io)
|
||||||
except:
|
except:
|
||||||
excinfo = exc_info()
|
excinfo = self.exc_info()
|
||||||
self._traceex(excinfo)
|
self._traceex(excinfo)
|
||||||
msg.post_sent(self, excinfo)
|
msg.post_sent(self, excinfo)
|
||||||
else:
|
else:
|
||||||
|
@ -193,7 +193,7 @@ class Gateway(object):
|
||||||
break
|
break
|
||||||
finally:
|
finally:
|
||||||
self._trace("_servemain finished")
|
self._trace("_servemain finished")
|
||||||
if self.joining:
|
if joining:
|
||||||
self.join()
|
self.join()
|
||||||
|
|
||||||
def remote_init_threads(self, num=None):
|
def remote_init_threads(self, num=None):
|
||||||
|
|
Loading…
Reference in New Issue