Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
I am not sure that it can be solved at Python level. Possible solutions: * Add a Lock method (or just a builtin function) which acquires and immediately releases the lock, without possibility to interrupt. if lock._blink(block, timeout): self._stop() * Add a context manager which suppresses keyboard interruption. with suppress_interrupt(): if not lock._blink(block, timeout): return self._stop() ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45274> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com