summaryrefslogtreecommitdiffstats
path: root/openstack
diff options
context:
space:
mode:
authorSteven Hardy <shardy@redhat.com>2012-11-12 19:43:40 +0000
committerSteven Hardy <shardy@redhat.com>2012-11-12 19:55:21 +0000
commit763802c08365fc3c4c69a8a670a0c39e63eb82ec (patch)
tree87d1a4e910aa4007a29a990cb165d6851e576184 /openstack
parent5e3c7b50398bd79cf4103f062584c12efc685451 (diff)
downloadoslo-763802c08365fc3c4c69a8a670a0c39e63eb82ec.tar.gz
oslo-763802c08365fc3c4c69a8a670a0c39e63eb82ec.tar.xz
oslo-763802c08365fc3c4c69a8a670a0c39e63eb82ec.zip
threadgroup : greethread.cancel() should be kill()
According to the eventlet documentation, cancel() will only stop a thread if called before the thread starts running, which is not what we want in this context - calling kill() here ensures that a currently running thread is actually stopped, which does not happen with the current cancel() call See : http://eventlet.net/doc/modules/greenthread.html Change-Id: I89c5bb3eb21e656bd865d5082779cf9ab83ad326 Signed-off-by: Steven Hardy <shardy@redhat.com>
Diffstat (limited to 'openstack')
-rw-r--r--openstack/common/threadgroup.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstack/common/threadgroup.py b/openstack/common/threadgroup.py
index f501889..f6fe50e 100644
--- a/openstack/common/threadgroup.py
+++ b/openstack/common/threadgroup.py
@@ -47,7 +47,7 @@ class Thread(object):
self.thread.link(_thread_done, group=group, thread=self)
def stop(self):
- self.thread.cancel()
+ self.thread.kill()
def wait(self):
return self.thread.wait()