Skip to content

Commit

Permalink
add notes on monkey patching (Fixes #383)
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed May 19, 2019
1 parent f8ee01f commit 5dd2bca
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,19 @@ be installed:
library is normally required to force the message queue package to use
coroutine friendly functions and classes.

For eventlet, monkey patching is done with::

import eventlet
eventlet.monkey_patch()

For gevent, you can monkey patch the standard library with::

from gevent import monkey
monkey.patch_all()

In both cases it is recommended that you apply the monkey patching at the top
of your main script, even above your imports.

To start multiple Flask-SocketIO servers, you must first ensure you have the
message queue service running. To start a Socket.IO server and have it connect to
the message queue, add the ``message_queue`` argument to the ``SocketIO``
Expand Down

0 comments on commit 5dd2bca

Please sign in to comment.