Commit 6278b200 authored by Stephan Richter's avatar Stephan Richter

parent 11364841
......@@ -25,7 +25,7 @@ register_loop_callback() to register interest. When the mainloop
thread calls loop(), each registered callback will be called with the
socket map as its first argument.
"""
__version__ = '$Revision: 1.12 $'[11:-2]
__version__ = '$Revision: 1.13 $'[11:-2]
import asyncore
import select
......@@ -150,6 +150,9 @@ def loop(timeout=30.0, use_poll=0, map=None):
except that it also triggers ThreadedAsync callback functions
before starting the loop.
"""
global exit_status
exit_status = None
if use_poll:
if hasattr(select, 'poll'):
poll_fun = asyncore.poll3
......@@ -162,10 +165,10 @@ def loop(timeout=30.0, use_poll=0, map=None):
map = asyncore.socket_map
_start_loop(map)
while map:
while map and exit_status is None:
poll_fun(timeout, map)
_stop_loop()
# This module used to do something evil -- it rebound asyncore.loop to the
# above loop() function. What was evil about this is that if you added some
......
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