This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients pablogsal, serhiy.storchaka, vstinner
Date 2021-09-23.21:39:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632433181.18.0.129692829919.issue45274@roundup.psfhosted.org>
In-reply-to
Content
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()
History
Date User Action Args
2021-09-23 21:39:41serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, pablogsal
2021-09-23 21:39:41serhiy.storchakasetmessageid: <1632433181.18.0.129692829919.issue45274@roundup.psfhosted.org>
2021-09-23 21:39:41serhiy.storchakalinkissue45274 messages
2021-09-23 21:39:41serhiy.storchakacreate