Message276203
FWIW, a workaround seems to be a nested try/except clause:
try:
try:
do_lots_of_work()
except RuntimeError as e:
print 'signal handling worked'
except RuntimeError:
print 'signal handling delayed'
I did a stress test over 100k runs, and got no unexpected behavior that way. I am not sure if the underlying race condition is just hidden, or if the inner except clause triggers the signal handling code internally -- either way, while cumbersome to use, it seems to work.
I'd still appreciate feedback on a cleaner solution.
Thanks, Andre. |
|
Date |
User |
Action |
Args |
2016-09-13 07:44:48 | Andre Merzky | set | recipients:
+ Andre Merzky, eryksun, gslavin |
2016-09-13 07:44:48 | Andre Merzky | set | messageid: <1473752688.04.0.252998082547.issue27889@psf.upfronthosting.co.za> |
2016-09-13 07:44:48 | Andre Merzky | link | issue27889 messages |
2016-09-13 07:44:47 | Andre Merzky | create | |
|