diff options
| author | Chris Behrens <cbehrens@codestud.com> | 2011-05-12 20:12:22 +0000 |
|---|---|---|
| committer | Chris Behrens <cbehrens@codestud.com> | 2011-05-12 20:12:22 +0000 |
| commit | 7dc76508d38370f3cf68029fae2ffb7749a580b2 (patch) | |
| tree | ae6886816b4dbe14aa5369c7c80706f98c12d7ea /nova/utils.py | |
| parent | e0dab6d678867e11e107a9418c7baeb5ac055de7 (diff) | |
| download | nova-7dc76508d38370f3cf68029fae2ffb7749a580b2.tar.gz nova-7dc76508d38370f3cf68029fae2ffb7749a580b2.tar.xz nova-7dc76508d38370f3cf68029fae2ffb7749a580b2.zip | |
if a LoopingCall has canceled the loop, break out early instead of sleeping any more than needed
Diffstat (limited to 'nova/utils.py')
| -rw-r--r-- | nova/utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/utils.py b/nova/utils.py index 80bf1197f..44ee1b623 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -459,6 +459,8 @@ class LoopingCall(object): try: while self._running: self.f(*self.args, **self.kw) + if not self._running: + break greenthread.sleep(interval) except LoopingCallDone, e: self.stop() |
