Merging rdw's blocking detector changes with my own
This commit is contained in:
@@ -84,9 +84,7 @@ class Hub(BaseHub):
|
|||||||
SYSTEM_EXCEPTIONS = self.SYSTEM_EXCEPTIONS
|
SYSTEM_EXCEPTIONS = self.SYSTEM_EXCEPTIONS
|
||||||
|
|
||||||
if self.debug_blocking:
|
if self.debug_blocking:
|
||||||
# shortest alarm we can possibly set is one second
|
self.block_detect_pre()
|
||||||
signal.signal(signal.SIGALRM, alarm_handler)
|
|
||||||
signal.alarm(1)
|
|
||||||
|
|
||||||
for fileno, event in presult:
|
for fileno, event in presult:
|
||||||
try:
|
try:
|
||||||
@@ -107,5 +105,5 @@ class Hub(BaseHub):
|
|||||||
clear_sys_exc_info()
|
clear_sys_exc_info()
|
||||||
|
|
||||||
if self.debug_blocking:
|
if self.debug_blocking:
|
||||||
signal.alarm(0)
|
self.block_detect_post()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user