This commit is contained in:
Ryan Williams
2009-12-07 13:29:09 -08:00
2 changed files with 8 additions and 9 deletions

View File

@@ -26,7 +26,7 @@ Thanks To
* Chuck Thier, reporting a bug in processes.py * Chuck Thier, reporting a bug in processes.py
* Brantley Harris, reporting bug #4 * Brantley Harris, reporting bug #4
* Taso Du Val, reproing an exception squelching bug, saving children's lives ;-) * Taso Du Val, reproing an exception squelching bug, saving children's lives ;-)
* R. Tyler Ballance, bug report on tpool on Windows, help with improving corolocal module, keen eye for redundancy, profile performance report * R. Tyler Ballance, bug report on tpool on Windows, help with improving corolocal module, keen eye for redundancy, profile performance report, suggestion use flush that fixed tpool on Windows
* Sergey Shepelev, PEP 8 police :-), reporting bug #5 * Sergey Shepelev, PEP 8 police :-), reporting bug #5
* Luci Stanescu, for reporting twisted hub bug * Luci Stanescu, for reporting twisted hub bug
* Marcus Cavanaugh, for test case code that has been incredibly useful in tracking down bugs * Marcus Cavanaugh, for test case code that has been incredibly useful in tracking down bugs

View File

@@ -25,8 +25,8 @@ QUIET=False
_rfile = _wfile = None _rfile = _wfile = None
def _signal_t2e(): def _signal_t2e():
from eventlet import util _wfile.write(' ')
sent = util.__original_write__(_wfile.fileno(), ' ') _wfile.flush()
_reqq = Queue(maxsize=-1) _reqq = Queue(maxsize=-1)
_rspq = Queue(maxsize=-1) _rspq = Queue(maxsize=-1)
@@ -36,9 +36,9 @@ def tpool_trampoline():
while(True): while(True):
try: try:
_c = _rfile.read(1) _c = _rfile.read(1)
assert(_c != "")
except ValueError: except ValueError:
break # will be raised when pipe is closed break # will be raised when pipe is closed
assert(_c != "")
while not _rspq.empty(): while not _rspq.empty():
try: try:
(e,rv) = _rspq.get(block=False) (e,rv) = _rspq.get(block=False)
@@ -197,9 +197,7 @@ def setup():
sock.listen(50) sock.listen(50)
csock = util.__original_socket__(socket.AF_INET, socket.SOCK_STREAM) csock = util.__original_socket__(socket.AF_INET, socket.SOCK_STREAM)
csock.connect(('localhost', sock.getsockname()[1])) csock.connect(('localhost', sock.getsockname()[1]))
csock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
nsock, addr = sock.accept() nsock, addr = sock.accept()
nsock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
_rfile = greenio.Green_fileobject(greenio.GreenSocket(csock)) _rfile = greenio.Green_fileobject(greenio.GreenSocket(csock))
_wfile = nsock.makefile() _wfile = nsock.makefile()
@@ -218,6 +216,7 @@ def killall():
_reqq.put(None) _reqq.put(None)
for thr in _threads.values(): for thr in _threads.values():
thr.join() thr.join()
if _coro:
api.kill(_coro) api.kill(_coro)
_rfile.close() _rfile.close()
_wfile.close() _wfile.close()