Force requirements modification to be locked.

... On my quest to make that stuff thread safe.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8135008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104033 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
maruel@chromium.org
2011-10-05 00:03:06 +00:00
parent 1333cb3edb
commit a91d26de47
2 changed files with 9 additions and 11 deletions

View File

@@ -497,6 +497,10 @@ class WorkItem(object):
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