Message372435
python3 When handling signals (via signal module) have delayed execution when main thread is blocked/waiting for event
That is sub-optimal(signal "could get lost"). Signals shoud be handled asap... Think about scenario when os may be asking python nicely before it sends os.kill...so we could be dead on next bytecode instruction of main thread.
In such scenario when main thread is blocked and VM recives signal it should "context switch" to handler immediately thus not being dependent on state of main thread to be in executable state.
This gotcha should be included in documentation of all 3.x version since there should be nothing running(including long-runing c computation like regex matching ;) ) and basicly nothing is preventing handler from execution
more details and test script in file attached
ps excuse my english/typos and uglines of code... this is my 1st bug report/enhancment proposal |
|
Date |
User |
Action |
Args |
2020-06-26 17:34:49 | Josef Havránek | set | recipients:
+ Josef Havránek |
2020-06-26 17:34:49 | Josef Havránek | set | messageid: <1593192889.65.0.44895771655.issue41128@roundup.psfhosted.org> |
2020-06-26 17:34:49 | Josef Havránek | link | issue41128 messages |
2020-06-26 17:34:49 | Josef Havránek | create | |
|