From 05f2317c5b3e75539fcf5348904aef72623f3f66 Mon Sep 17 00:00:00 2001 From: Boris Bobrov Date: Thu, 24 Nov 2016 12:52:51 +0300 Subject: [PATCH] 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 --- keystone/trust/backends/sql.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/keystone/trust/backends/sql.py b/keystone/trust/backends/sql.py index 378fa57769..1356f4ec67 100644 --- a/keystone/trust/backends/sql.py +++ b/keystone/trust/backends/sql.py @@ -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