Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
ef6588d2
Commit
ef6588d2
authored
4 years ago
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation tweaks.
parent
ee964f81
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
src/gevent/_semaphore.py
src/gevent/_semaphore.py
+2
-5
src/gevent/lock.py
src/gevent/lock.py
+8
-1
No files found.
src/gevent/_semaphore.py
View file @
ef6588d2
...
...
@@ -17,9 +17,8 @@ class Semaphore(AbstractLinkable): # pylint:disable=undefined-variable
"""
Semaphore(value=1) -> Semaphore
.. note::
Most users should prefer :class:`BoundedSemaphore`, a safer
subclass of this class.
.. seealso:: :class:`BoundedSemaphore` for a safer version that prevents
some classes of bugs. If unsure, most users should opt for `BoundedSemaphore`.
A semaphore manages a counter representing the number of `release`
calls minus the number of `acquire` calls, plus an initial value.
...
...
@@ -35,8 +34,6 @@ class Semaphore(AbstractLinkable): # pylint:disable=undefined-variable
This Semaphore's ``__exit__`` method does not call the trace function
on CPython, but does under PyPy.
.. seealso:: :class:`BoundedSemaphore` for a safer version that prevents
some classes of bugs.
.. versionchanged:: 1.4.0
Document that the order in which waiters are awakened is not specified. It was not
...
...
This diff is collapsed.
Click to expand it.
src/gevent/lock.py
View file @
ef6588d2
# Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details.
"""Locking primitives"""
"""
Locking primitives.
These include semaphores with arbitrary bounds (:class:`Semaphore` and
its safer subclass :class:`BoundedSemaphore`) and a semaphore with
infinite bounds (:class:`DummySemaphore`), along with a reentrant lock
(:class:`RLock`) with the same API as :class:`threading.RLock`.
"""
from
__future__
import
absolute_import
from
gevent.hub
import
getcurrent
...
...
This diff is collapsed.
Click to expand it.
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