Set tpool to be quiet by default, improved exception raising.
This commit is contained in:
@@ -15,12 +15,13 @@
|
||||
|
||||
import os
|
||||
import threading
|
||||
import sys
|
||||
|
||||
from Queue import Empty, Queue
|
||||
|
||||
from eventlet import api, coros, greenio
|
||||
|
||||
QUIET=False
|
||||
QUIET=True
|
||||
|
||||
_rfile = _wfile = None
|
||||
|
||||
@@ -69,9 +70,7 @@ def tworker():
|
||||
except SYS_EXCS:
|
||||
raise
|
||||
except Exception,exn:
|
||||
import sys
|
||||
(a,b,tb) = sys.exc_info()
|
||||
rv = (exn,a,b,tb)
|
||||
rv = sys.exc_info()
|
||||
_rspq.put((e,rv))
|
||||
meth = args = kwargs = e = rv = None
|
||||
_signal_t2e()
|
||||
@@ -79,13 +78,13 @@ def tworker():
|
||||
|
||||
def erecv(e):
|
||||
rv = e.wait()
|
||||
if isinstance(rv,tuple) and len(rv) == 4 and isinstance(rv[0],Exception):
|
||||
if isinstance(rv,tuple) and len(rv) == 3 and isinstance(rv[1],Exception):
|
||||
import traceback
|
||||
(e,a,b,tb) = rv
|
||||
(c,e,tb) = rv
|
||||
if not QUIET:
|
||||
traceback.print_exception(Exception,e,tb)
|
||||
traceback.print_exception(c,e,tb)
|
||||
traceback.print_stack()
|
||||
raise e
|
||||
raise c,e,tb
|
||||
return rv
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user