def target(self):
while self.event.wait():<EOL><INDENT>self.event.clear()<EOL>while True:<EOL><INDENT>with self.lock:<EOL><INDENT>if not self.count:<EOL><INDENT>break<EOL><DEDENT>self.count -= <NUM_LIT:1><EOL><DEDENT>with self.condition:<EOL><INDENT>self.condition.notify_all()<EOL><DEDENT><DEDENT><DEDENT>
Thread routine