You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The acquire() method documentation stated 'Exactly one thread will be awoken
by each call to release()' which became incorrect when the n parameter was
added to release() in Python 3.9.
The release() method documentation was ambiguous about behavior when
n > waiting_threads.
Changes:
- acquire(): Updated to reflect that release(n) wakes min(j,n) threads
where j = waiting threads
- release(): Clarified that it wakes 'up to n' threads, or all available
if fewer than n are waiting
The fix aligns documentation with actual implementation behavior in
Lib/threading.py where release(n) calls Condition.notify(n).
0 commit comments