File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,24 +35,18 @@ The C-API provides a basic mutual exclusion lock.
3535
3636.. c :function :: void PyMutex_Lock (PyMutex *m)
3737
38- Lock mutex *m *. If another thread has already locked it , the calling
39- thread will block until the mutex is unlocked. While blocked, the thread
38+ Lock mutex *m *. If the mutex is already locked, the calling
39+ thread will block until the mutex is unlocked. While blocked, the thread
4040 will temporarily detach the :term: `thread state <attached thread state> ` if one exists.
4141
42- .. warning ::
43-
44- This function will deadlock if the calling thread already holds the lock.
45- :c:type: `!PyMutex ` is not re-entrant. For re-entrant locking, use
46- :c:func: `Py_BEGIN_CRITICAL_SECTION ` instead.
47-
4842 .. versionadded :: 3.13
4943
5044.. c :function :: void PyMutex_Unlock (PyMutex *m)
5145
5246 Unlock mutex *m *. The mutex must be locked by the calling thread ---
5347 otherwise, the function will issue a fatal error. Unlocking a mutex from
54- a different thread than the one that locked it results in undefined
55- behavior .
48+ a different thread than the one that locked it also results in a fatal
49+ error .
5650
5751 .. versionadded :: 3.13
5852
You can’t perform that action at this time.
0 commit comments