'Return the "write" lock context manager.
This will provide a section that is mutexed against
all readers/writers for the dogpile-maintained value.'

@contextlib.contextmanager
def acquire_write_lock(self):

    self.readwritelock.acquire_write_lock()
    try:
        (yield)
    finally:
        self.readwritelock.release_write_lock()
