'Reset the internal flag to false.
Subsequently, threads calling wait() will block until set() is called to
set the internal flag to true again.'

def clear(self):

    self.__cond.acquire()
    try:
        self.__flag = False
    finally:
        self.__cond.release()
