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,11 +26,11 @@ Thanks To
* Chuck Thier, reporting a bug in processes.py
* Brantley Harris, reporting bug #4
* 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
* Luci Stanescu, for reporting twisted hub bug
* Marcus Cavanaugh, for test case code that has been incredibly useful in tracking down bugs
* Brian Brunswick, for many helpful questions and suggestions on the mailing list
* Cesar Alaniz, for uncovering bugs of great import
* the grugq, for contributing patches, suggestions, and use cases
* Ralf Schmitt, for wsgi/webob incompatibility bug report and suggested fix
* Ralf Schmitt, for wsgi/webob incompatibility bug report and suggested fix

View File

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