Work around lock failure on cygwin.

This is really bad but the lock is never held for a long time so it 'should' work.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105195 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gclient_utils.py b/gclient_utils.py
index 235d414..39fb2f6 100644
--- a/gclient_utils.py
+++ b/gclient_utils.py
@@ -481,7 +481,14 @@
   def __init__(self, name):
     # A unique string representing this work item.
     self._name = name
-    self.lock = threading.RLock()
+    try:
+      self.lock = threading.Lock()
+    except:  # pylint: disable=W0702
+      if sys.platform != 'cygwin':
+        raise
+      # 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
 
   def run(self, work_queue):
     """work_queue is passed as keyword argument so it should be