Skip to content

Commit

Permalink
Changed documentation on eventlet (celery#4724)
Browse files Browse the repository at this point in the history
* This is redundant because symbol_by_name will be called for self.registry_clss in __init__ method

* Corrected 'blocking call' to 'CPU-bound operation'

* additional changes in the comment after review
  • Loading branch information
bombs-kim authored and Omer Katz committed May 15, 2018
1 parent 3aaa753 commit 28dbb6b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions docs/userguide/concurrency/eventlet.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,16 @@ change how you run your code, not how you write it.
* The event dispatch is implicit: meaning you can easily use Eventlet
from the Python interpreter, or as a small part of a larger application.

Celery supports Eventlet as an alternative execution pool implementation.
It's in some cases superior to prefork, but you need to ensure
your tasks don't perform blocking calls, as this will halt all
other operations in the worker until the blocking call returns.

Celery supports Eventlet as an alternative execution pool implementation and
in some cases superior to prefork. However, you need to ensure one task doesn't
block the event loop too long. Generally, CPU-bound operations don't go well
with Evenetlet. Also note that some libraries, usually with C extensions,
cannot be monkeypatched and therefore cannot benefit from using Eventlet.
Please refer to their documentation if you are not sure. For example, pylibmc
does not allow cooperation with Eventlet but psycopg2 does when both of them
are libraries with C extensions.


The prefork pool can take use of multiple processes, but how many is
often limited to a few processes per CPU. With Eventlet you can efficiently
Expand Down

0 comments on commit 28dbb6b

Please sign in to comment.