Message413166
While bundling the lock.release() into C makes that bulletproof, is there a bulletproof way to guarantee that `self._stop()` gets called if the acquire_and_release() succeeds? Offhand, I don't see a reason for why that isn't just as vulnerable to getting skipped due to an unfortunate signal.
Indeed, huge mounds of threading.py can leave things in insane states in the presence of by-magic exceptions. Even if code is very careful to put crucial cleanup code in `finally` blocks so it gets executed "no matter what", there's nothing to stop code in `finally` blocks from getting skipped over due to by-magic exceptions too.
It's an eternal marvel that anything ever works at all ;-) |
|
Date |
User |
Action |
Args |
2022-02-13 04:31:41 | tim.peters | set | recipients:
+ tim.peters, pitrou, vstinner, serhiy.storchaka, eryksun, Kevin Shweh, bjs, SnoopJeDi |
2022-02-13 04:31:41 | tim.peters | set | messageid: <1644726701.8.0.607022763188.issue46726@roundup.psfhosted.org> |
2022-02-13 04:31:41 | tim.peters | link | issue46726 messages |
2022-02-13 04:31:41 | tim.peters | create | |
|