~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lock.py

  • Committer: John Arbash Meinel
  • Date: 2007-03-19 21:45:03 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: john@arbash-meinel.com-20070319214503-1t048spp6n2tbro7
Disable read locks blocking on write locks.
This requires some small test updates to disable that sort of check.
But it should allow the rest of the test suite to pass on non-win32

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
        def __init__(self, filename):
159
159
            super(_fcntl_ReadLock, self).__init__()
160
160
            self.filename = osutils.realpath(filename)
161
 
            if self.filename in _fcntl_WriteLock._open_locks:
162
 
                raise errors.LockContention(self.filename)
 
161
            # if self.filename in _fcntl_WriteLock._open_locks:
 
162
            #     raise errors.LockContention(self.filename)
163
163
            _fcntl_ReadLock._open_locks.setdefault(self.filename, 0)
164
164
            _fcntl_ReadLock._open_locks[self.filename] += 1
165
165
            self._open(filename, 'rb')