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
8e3e0115
Commit
8e3e0115
authored
Feb 24, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strengthen docs on monkey-patching early. [skip ci]
parent
cc02ca9e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
doc/intro.rst
doc/intro.rst
+10
-4
No files found.
doc/intro.rst
View file @
8e3e0115
...
...
@@ -105,9 +105,15 @@ modules using the :func:`gevent.monkey.patch_all` function::
>>> import subprocess # it's usable from multiple greenlets now
.. note:: When monkey patching, it is recommended to do so as early as
possible in the lifetime of the process. If possible,
monkey patching should be the first lines executed.
.. tip::
When monkey patching, it is recommended to do so as early as
possible in the lifetime of the process. If possible,
monkey patching should be the first lines executed. Monkey
patching later, especially if native threads have been
created, :mod:`atexit` or signal handlers have been installed,
or sockets have been created, may lead to unpredictable
results including unexpected :exc:`~gevent.hub.LoopExit` errors.
__ https://github.com/gevent/gevent/blob/master/examples/concurrent_download.py#L1
...
...
@@ -151,7 +157,7 @@ information.
.. _`libev documentation`: http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#FUNCTIONS_CONTROLLING_EVENT_LOOPS
The Libev API is available under the :mod:`gevent.core` module. Note that
the callbacks supplied to the libev API are run in the :class:`gevent.hub.Hub`
the callbacks supplied to the libev API are run in the :class:`
~
gevent.hub.Hub`
greenlet and thus cannot use the synchronous gevent API. It is possible to
use the asynchronous API there, like :func:`gevent.spawn` and
:meth:`gevent.event.Event.set`.
...
...
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