Do not exit event loop if an unhandled exception occurs in a callback
This commit is contained in:
parent
f4e3fbcb2e
commit
5ee4458e04
1 changed files with 5 additions and 1 deletions
|
|
@ -176,7 +176,11 @@ def on_wakeup(self):
|
|||
func, args = self.action_queue.get_nowait()
|
||||
except Empty:
|
||||
break
|
||||
func(*args)
|
||||
try:
|
||||
func(*args)
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
def add_child_fd(self, child_fd, read_ready, write_ready):
|
||||
self.read_dispatch_map[child_fd] = read_ready
|
||||
|
|
|
|||
Loading…
Reference in a new issue