[openstack-dev] [eventlet] should we use spawn instead of spawn_n?
rbryant at redhat.com
Mon Dec 2 13:58:05 UTC 2013
On 11/29/2013 01:01 AM, Jian Wen wrote:
> eventlet.spawn_n is the same as eventlet.spawn, but it’s not possible
> to know how the function terminated (i.e. no return value or exceptions).
> If an exception is raised in the function, spawn_n prints a stack trace.
> The stack trace will not be written to the log file. It will be lost if we
> restart the daemon.
> Maybe we need to replace spawn_n with spawn. If an exception is raised
> in the
> function, we can log it if needed. Any thoughts?
> related bug: https://bugs.launchpad.net/neutron/+bug/1254984
>  http://eventlet.net/doc/basic_usage.html
In most cases the use of spawn_n is intentional. There certainly should
not be a mass search and replace of this.
In the case of the patch you submitted , I think the change makes
sense. The code was already waiting for all operations to finish.
Adding some error handling seems like a good idea.
More information about the OpenStack-dev