Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: gclient_utils.py

Issue 8174014: Stop modifiying requirements out of thread and generate it instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Fix the lack of constant ordering in GClientSmokeBoth.testMultiSolutionsJobs Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: gclient_utils.py
diff --git a/gclient_utils.py b/gclient_utils.py
index 958034dfc65bc7ec1b8e8c19d527f823963e3de0..235d414585835785db978f3d3ffe88b1e11c2eca 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -479,13 +479,10 @@ def lockedmethod(method):
class WorkItem(object):
"""One work item."""
def __init__(self, name):
- # A list of string, each being a WorkItem name.
- self._requirements = set()
# A unique string representing this work item.
self._name = name
self.lock = threading.RLock()
- @lockedmethod
def run(self, work_queue):
"""work_queue is passed as keyword argument so it should be
the last parameters of the function when you override it."""
@@ -495,15 +492,6 @@ class WorkItem(object):
def name(self):
return self._name
- @property
- @lockedmethod
- def requirements(self):
- return tuple(self._requirements)
-
- @lockedmethod
- def add_requirement(self, new):
- self._requirements.add(new)
-
class ExecutionQueue(object):
"""Runs a set of WorkItem that have interdependencies and were WorkItem are
« no previous file with comments | « gclient.py ('k') | tests/gclient_smoketest.py » ('j') | tests/gclient_smoketest.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698