Remove eventlet-related call to sleep

Eventlet patched time.sleep. When time.sleep was called, eventlet
switched to another worker. The code being removed gave eventlet
a chance to switch to another worker if there was one.

Eventlet was removed a long time ago and the call being removed
is not needed any more.

Change-Id: I2d23f20f94c2f2e0917be9ea67e7e5edf3514aff
This commit is contained in:
Boris Bobrov 2016-11-24 12:52:51 +03:00
parent 54d6838894
commit 05f2317c5b

View File

@ -12,8 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import time
from oslo_utils import timeutils
from six.moves import range
@ -116,10 +114,6 @@ class Trust(base.TrustDriverBase):
break
else:
raise exception.TrustUseLimitReached(trust_id=trust_id)
# NOTE(morganfainberg): Ensure we have a yield point for eventlet
# here. This should cost us nothing otherwise. This can be removed
# if/when oslo_db cleanly handles yields on db calls.
time.sleep(0)
else:
# NOTE(morganfainberg): In the case the for loop is not prematurely
# broken out of, this else block is executed. This means the trust