mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-08 11:16:09 +00:00
core/loop: prevent finalizers from doing things when task is closed externally
This commit is contained in:
parent
e642853767
commit
3dbd9c9eca
@ -341,6 +341,8 @@ class race(Syscall):
|
|||||||
except: # noqa: E722
|
except: # noqa: E722
|
||||||
# exception was raised on the waiting task externally with
|
# exception was raised on the waiting task externally with
|
||||||
# close() or throw(), kill the children tasks and re-raise
|
# close() or throw(), kill the children tasks and re-raise
|
||||||
|
# Make sure finalizers don't continue processing.
|
||||||
|
self.finished.append(self)
|
||||||
self.exit()
|
self.exit()
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user