From 763802c08365fc3c4c69a8a670a0c39e63eb82ec Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Mon, 12 Nov 2012 19:43:40 +0000 Subject: 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 --- openstack/common/threadgroup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstack/common') 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() -- cgit