Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b8925ba2
Commit
b8925ba2
authored
Oct 13, 2013
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Closes #15829: document ThreadError and fix exception raised for releasing unlocked locks.
parent
19c46035
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
Doc/library/threading.rst
Doc/library/threading.rst
+8
-1
No files found.
Doc/library/threading.rst
View file @
b8925ba2
...
...
@@ -208,6 +208,13 @@ This module defines the following functions and objects:
.. versionadded:: 2.5
.. exception:: ThreadError
Raised for various threading-related errors as described below. Note that
many interfaces use :exc:`RuntimeError` instead of :exc:`ThreadError`.
Detailed interfaces for the objects are documented below.
The design of this module is loosely based on Java's threading model. However,
...
...
@@ -406,7 +413,7 @@ blocks until a call to :meth:`release` in another thread changes it to unlocked,
then the :meth:`acquire` call resets it to locked and returns. The
:meth:`release` method should only be called in the locked state; it changes the
state to unlocked and returns immediately. If an attempt is made to release an
unlocked lock, a :exc:`
Runtime
Error` will be raised.
unlocked lock, a :exc:`
Thread
Error` will be raised.
When more than one thread is blocked in :meth:`acquire` waiting for the state to
turn to unlocked, only one thread proceeds when a :meth:`release` call resets
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment