Skip to content

Commit ec3778e

Browse files
committed
Eliminate some redundancy.
1 parent 84ba453 commit ec3778e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Doc/c-api/init.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,14 +2587,17 @@ These APIs are obsolete since Python 3.13 with the introduction of
25872587
would use a lock provided by the operating system.
25882588
25892589
2590-
.. c:function:: PyThread_free_lock(PyThread_type_lock lock)
2590+
.. c:function:: void PyThread_free_lock(PyThread_type_lock lock)
25912591
2592-
Destroy the lock *lock*.
2592+
Destroy *lock*. The lock should not be held by any thread when calling
2593+
this.
2594+
2595+
The caller does not need to hold an :term:`attached thread state`.
25932596
25942597
25952598
.. c:function:: PyLockStatus PyThread_acquire_lock_timed(PyThread_type_lock lock, long long microseconds, int intr_flag)
25962599
2597-
Acquire lock *lock*.
2600+
Acquire *lock* with a timeout.
25982601
25992602
This will wait for *microseconds* microseconds to acquire the lock. If the
26002603
timeout expires, this function returns :c:enumerator:`PY_LOCK_FAILURE`.
@@ -2612,7 +2615,7 @@ These APIs are obsolete since Python 3.13 with the introduction of
26122615
26132616
.. c:function:: int PyThread_acquire_lock(PyThread_type_lock lock, int waitflag)
26142617
2615-
Acquire lock *lock*.
2618+
Acquire *lock*.
26162619
26172620
If *waitflag* is ``1`` and another thread currently holds the lock, this
26182621
function will wait until the lock can be acquired and will always return
@@ -2630,7 +2633,7 @@ These APIs are obsolete since Python 3.13 with the introduction of
26302633
26312634
.. c:function:: int PyThread_release_lock(PyThread_type_lock lock)
26322635
2633-
Release lock *lock*. If *lock* is not held, then this function issues a
2636+
Release *lock*. If *lock* is not held, then this function issues a
26342637
fatal error.
26352638
26362639
The caller does not need to hold an :term:`attached thread state`.

0 commit comments

Comments
 (0)