In addition to the monkey_patch questions,  we use eventlet's same function
with different ways, there is some example:

greenthread.sleep(0)  vs time.sleep(0)
-----------------------------------------------------
greenthread.spawn   vs eventlet.spawn

I'm updating doc [1] to show different ways ,  shall  we need unify the way,
if yes, which way is better

[1]  https://review.openstack.org/#/c/199013


2015-07-08 16:51 GMT+08:00 ChangBo Guo <[email protected]>:

> we use eventlet in nova code base , at the beginning of  each nova service
> we monkey_patched standard libraries like:
>
> import eventlet
>
> from nova import debugger
>
> if debugger.enabled():
>     # turn off thread patching to enable the remote debugger
>     eventlet.monkey_patch(os=False, thread=False)
> else:
>     eventlet.monkey_patch(os=False)
>
> I find an related comments about monkey_patch(os=False) from Cinder code:
> if os.name == 'nt':
>     # eventlet monkey patching the os module causes subprocess.Popen to
> fail
>     # on Windows when using pipes due to missing non-blocking IO support.
>     eventlet.monkey_patch(os=False)
> else:
>     eventlet.monkey_patch()
>
>
> My question is : Is there any other reason we didn't monkey_patch os in
> Nova
>
> --
> ChangBo Guo(gcb)
>



-- 
ChangBo Guo(gcb)
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to