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
8582c0dd
Commit
8582c0dd
authored
Oct 12, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak docs for gevent.pool. Fixes #1279.
parent
f77ab4ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
11 deletions
+30
-11
doc/api/gevent.pool.rst
doc/api/gevent.pool.rst
+14
-4
doc/conf.py
doc/conf.py
+1
-1
src/gevent/pool.py
src/gevent/pool.py
+15
-6
No files found.
doc/api/gevent.pool.rst
View file @
8582c0dd
:mod:`gevent.pool` -- Managing greenlets in a group
===================================================
.. automodule:: gevent.pool
:members:
:undoc-members:
:inherited-members:
.. module:: gevent.pool
.. autoclass:: gevent.pool.Group
:members:
:inherited-members:
.. automethod:: __len__
.. automethod:: __contains__
.. autoclass:: gevent.pool.PoolFull
:members:
.. autoclass:: gevent.pool.Pool
:members:
doc/conf.py
View file @
8582c0dd
...
...
@@ -71,7 +71,7 @@ master_doc = 'contents'
# General information about the project.
project
=
u'gevent'
copyright
=
u'2009-201
5
, gevent contributors'
copyright
=
u'2009-201
8
, gevent contributors'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
...
...
src/gevent/pool.py
View file @
8582c0dd
...
...
@@ -289,10 +289,15 @@ class Group(GroupMappingMixin):
they can be tested to see if they contain a greenlet, and they know the
number (len) of greenlets they are tracking. If they are not tracking any
greenlets, they are False in a boolean context.
.. attribute:: greenlet_class
Either :class:`gevent.Greenlet` (the default) or a subclass.
These are the type of
object we will :meth:`spawn`. This can be
changed on an instance or in a subclass.
"""
#: The type of Greenlet object we will :meth:`spawn`. This can be changed
#: on an instance or in a subclass.
greenlet_class
=
Greenlet
def
__init__
(
self
,
*
args
):
...
...
@@ -524,10 +529,14 @@ class Pool(Group):
maximum count of active greenlets that will be allowed in
this pool. A few values have special significance:
* ``None`` (the default) places no limit on the number of
greenlets. This is useful when you need to track, but not limit,
greenlets, as with :class:`gevent.pywsgi.WSGIServer`. A :class:`Group`
may be a more efficient way to achieve the same effect.
* `None` (the default) places no limit on the number of
greenlets. This is useful when you want to track, but not limit,
greenlets. In general, a :class:`Group`
may be a more efficient way to achieve the same effect, but some things
need the additional abilities of this class (one example being the *spawn*
parameter of :class:`gevent.baseserver.BaseServer` and
its subclass :class:`gevent.pywsgi.WSGIServer`).
* ``0`` creates a pool that can never have any active greenlets. Attempting
to spawn in this pool will block forever. This is only useful
if an application uses :meth:`wait_available` with a timeout and checks
...
...
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