diff --git a/doc/basic_usage.rst b/doc/basic_usage.rst index db242b3..f33a7aa 100644 --- a/doc/basic_usage.rst +++ b/doc/basic_usage.rst @@ -24,7 +24,7 @@ Greenthread Spawn .. function:: eventlet.spawn_n(func, *args, **kw) - The same as :func:`spawn`, but it's not possible to retrieve the return value. This makes execution faster. See :func:`spawn_n ` for more details. + The same as :func:`spawn`, but it's not possible to know how the function terminated (i.e. no return value or exceptions). This makes execution faster. See :func:`spawn_n ` for more details. .. function:: eventlet.spawn_after(seconds, func, *args, **kw) diff --git a/eventlet/greenthread.py b/eventlet/greenthread.py index 7bcaf93..65cb045 100644 --- a/eventlet/greenthread.py +++ b/eventlet/greenthread.py @@ -54,9 +54,15 @@ def _main_wrapper(func, args, kwargs): def spawn_n(func, *args, **kwargs): - """Same as :func:`spawn`, but returns a ``greenlet`` object from which it is - not possible to retrieve the results. This is faster than :func:`spawn`; - it is fastest if there are no keyword arguments.""" + """Same as :func:`spawn`, but returns a ``greenlet`` object from + which it is not possible to retrieve either a return value or + whether it raised any exceptions. This is faster than + :func:`spawn`; it is fastest if there are no keyword arguments. + + If an exception is raised in the function, spawn_n prints a stack + trace; the print can be disabled by calling + :func:`eventlet.debug.hub_exceptions` with False. + """ return _spawn_n(0, func, args, kwargs)[1]