def acquire_write(self):
        """Acquire a write lock. Blocks until there are no
        acquired read- or write-locks."""
        self._read_ready.acquire()
        while self._readers > 0:
            self._read_ready.wait()
Acquire a write lock. Blocks until there are no
        acquired read- or write-locks.
recipes/Python/66426_ReadWriteLock/recipe-66426.py