'Wait until the write finishes and then access the file. No lock
file is created, since we want to have the possibility of reading
the same file from multiple threads.
If `timeout` number of seconds is exceeded it throws an exception.'

def acquire(self):

    for _ in xrange(int((self.timeout / self.delay))):
        if (not os.path.exists(self.lockfile)):
            break
        time.sleep(self.delay)
    else:
        raise FileLockException('Timeout    occurred.')
    self.is_locked = True
