'Calling thread waits for a given number.
of milliseconds or until notified.'

def wait(self, timeout):

    self.condition.acquire()
    self.condition.wait((timeout / 1000))
    self.condition.release()
