https://github.com/python/cpython/commit/49f171d9ea26be64f2be20a6448bd5de441a677b commit: 49f171d9ea26be64f2be20a6448bd5de441a677b branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: kumaraditya303 <[email protected]> date: 2024-10-11T08:20:46Z summary:
[3.13] gh-125058: update `_thread` docs regarding interruptibility of `lock.acquire()` (GH-125141) (#125306) gh-125058: update `_thread` docs regarding interruptibility of `lock.acquire()` (GH-125141) (cherry picked from commit 0135848059162ad81478a7776fec622d68a36524) Co-authored-by: Jan Kaliszewski <[email protected]> files: M Doc/library/_thread.rst diff --git a/Doc/library/_thread.rst b/Doc/library/_thread.rst index 5fd604c05380ac..6a66fc4c64bc45 100644 --- a/Doc/library/_thread.rst +++ b/Doc/library/_thread.rst @@ -219,9 +219,11 @@ In addition to these methods, lock objects can also be used via the * Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is equivalent to calling :func:`_thread.exit`. -* It is not possible to interrupt the :meth:`~threading.Lock.acquire` method on - a lock --- the :exc:`KeyboardInterrupt` exception will happen after the lock - has been acquired. +* It is platform-dependent whether the :meth:`~threading.Lock.acquire` method + on a lock can be interrupted (so that the :exc:`KeyboardInterrupt` exception + will happen immediately, rather than only after the lock has been acquired or + the operation has timed out). It can be interrupted on POSIX, but not on + Windows. * When the main thread exits, it is system defined whether the other threads survive. On most systems, they are killed without executing _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
