Commit bb50e969 authored by Guido van Rossum's avatar Guido van Rossum

Use asyncore.loop() rather than an emulation. The emulation caused

the server to take the "async=0" path which could cause recursive
calls to message_input() or message_output(), which would hang due to
the input/output locks.
parent 1441bcef
......@@ -68,11 +68,14 @@ def main(args):
t = ZEOTestServer(('', test_port), storage)
addr = ('', zeo_port)
serv = ZEO.StorageServer.StorageServer(addr, {'1': storage}, ro_svr)
import zLOG
label = "winserver:%d" % os.getpid()
while asyncore.socket_map:
zLOG.LOG(label, zLOG.DEBUG, "map: %r" % asyncore.socket_map)
asyncore.poll(30.0)
asyncore.loop()
# XXX The code below is evil because it can cause deadlocks in zrpc.
# (To fix it, calling ThreadedAsync._start_loop() might help.)
## import zLOG
## label = "winserver:%d" % os.getpid()
## while asyncore.socket_map:
## zLOG.LOG(label, zLOG.DEBUG, "map: %r" % asyncore.socket_map)
## asyncore.poll(30.0)
if __name__ == "__main__":
import sys
......
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