Change in vdsm[master]: executor: Fix thread-unsafe call
nsoffer at redhat.com
nsoffer at redhat.com
Sat Jul 18 01:08:16 UTC 2015
Nir Soffer has uploaded a new change for review.
Change subject: executor: Fix thread-unsafe call
......................................................................
executor: Fix thread-unsafe call
Deques support thread-safe, appends and pops from either side of the
deque, but deque.clear() is not documented as thread-safe, so we should
not assume it is. Now we take the condition before invoking clear.
Change-Id: Ia99d44698bc03bfcbac1a66f151f40220b8b4ef9
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M lib/vdsm/executor.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/43790/1
diff --git a/lib/vdsm/executor.py b/lib/vdsm/executor.py
index 3e96a75..25f991f 100644
--- a/lib/vdsm/executor.py
+++ b/lib/vdsm/executor.py
@@ -250,4 +250,5 @@
self._cond.wait()
def clear(self):
- self._tasks.clear()
+ with self._cond:
+ self._tasks.clear()
--
To view, visit https://gerrit.ovirt.org/43790
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia99d44698bc03bfcbac1a66f151f40220b8b4ef9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
More information about the vdsm-patches
mailing list