Chromium Code Reviews| Index: gclient_utils.py |
| diff --git a/gclient_utils.py b/gclient_utils.py |
| index 235d414585835785db978f3d3ffe88b1e11c2eca..852f7243ac8b26d010c669ce7ae211012977ec5d 100644 |
| --- a/gclient_utils.py |
| +++ b/gclient_utils.py |
| @@ -481,7 +481,12 @@ class WorkItem(object): |
| def __init__(self, name): |
| # A unique string representing this work item. |
| self._name = name |
| - self.lock = threading.RLock() |
| + try: |
| + self.lock = threading.Lock() |
|
Dirk Pranke
2011/10/12 23:24:32
Is changing from an RLock to a Lock intentional? A
M-A Ruel
2011/10/12 23:28:32
It's intentional, the code doesn't have any recurs
|
| + except: # pylint: disable=W0702 |
| + # On cygwin, it's throwing randomly. Hack and reuse the single |
| + # sys.stdout.lock. Yep you read it right. Single lock. |
| + self.lock = sys.stdout.lock |
|
Dirk Pranke
2011/10/12 23:24:32
Can we wrap this in an if sys.platform == 'cygwin'
M-A Ruel
2011/10/12 23:28:32
done
|
| def run(self, work_queue): |
| """work_queue is passed as keyword argument so it should be |