yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #17244
[Bug 1161965] Re: Stop exposing the greenthread abstraction in compute.manager
** Changed in: nova
Status: Triaged => Opinion
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1161965
Title:
Stop exposing the greenthread abstraction in compute.manager
Status in OpenStack Compute (Nova):
Opinion
Bug description:
In order to make it easier to someday (or maybe not someday) move off
of greenlet/eventlet it would be nice to not always expose things like
greenthread.sleep(0) in code, but instead put an abstraction layer up
that performs this action instead.
For example:
for bw_ctr in bw_counters:
# Allow switching of greenthreads between queries.
greenthread.sleep(0)
# Do work...
Instead this could be:
for bw_ctr in task_switcher_iter(bw_counters):
# Do work...
Notice that we can now make the 'task_switcher_iter' do the greenthread.sleep
or not do it at all, thus making the code cleaner and making it easier to drop
eventlet if this ever becomes a issue (aka with python3 lacking eventlet support)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1161965/+subscriptions