import threading
import time

class OffShooter(threading.Thread):
    def __init__(self, event, name):
        super(OffShooter, self).__init__()
        self.name = name
        self.event = event

    def run(self):
        for counter in range(5):
            print("counter = %d" % counter)
            self.event.set()
            time.sleep(3)

if __name__ == '__main__':

    event = threading.Event()

    ooo = OffShooter(event, "tako").start()

    while True:
        if event.wait(1) == False:
            print("Timeout ...")
        else:
            event.clear()
            print("Hi")

d3b5512630ddc786abd0f27bbeab6cc429aabc4a
<mask token>


class OffShooter(threading.Thread):
    <mask token>

    def run(self):
        for counter in range(5):
            print('counter = %d' % counter)
            self.event.set()
            time.sleep(3)


<mask token>

<mask token>


class OffShooter(threading.Thread):

    def __init__(self, event, name):
        super(OffShooter, self).__init__()
        self.name = name
        self.event = event

    def run(self):
        for counter in range(5):
            print('counter = %d' % counter)
            self.event.set()
            time.sleep(3)


<mask token>

<mask token>


class OffShooter(threading.Thread):

    def __init__(self, event, name):
        super(OffShooter, self).__init__()
        self.name = name
        self.event = event

    def run(self):
        for counter in range(5):
            print('counter = %d' % counter)
            self.event.set()
            time.sleep(3)


if __name__ == '__main__':
    event = threading.Event()
    ooo = OffShooter(event, 'tako').start()
    while True:
        if event.wait(1) == False:
            print('Timeout ...')
        else:
            event.clear()
            print('Hi')

import threading
import time


class OffShooter(threading.Thread):

    def __init__(self, event, name):
        super(OffShooter, self).__init__()
        self.name = name
        self.event = event

    def run(self):
        for counter in range(5):
            print('counter = %d' % counter)
            self.event.set()
            time.sleep(3)


if __name__ == '__main__':
    event = threading.Event()
    ooo = OffShooter(event, 'tako').start()
    while True:
        if event.wait(1) == False:
            print('Timeout ...')
        else:
            event.clear()
            print('Hi')

import threading
import time

class OffShooter(threading.Thread):
    def __init__(self, event, name):
        super(OffShooter, self).__init__()
        self.name = name
        self.event = event

    def run(self):
        for counter in range(5):
            print("counter = %d" % counter)
            self.event.set()
            time.sleep(3)

if __name__ == '__main__':

    event = threading.Event()

    ooo = OffShooter(event, "tako").start()

    while True:
        if event.wait(1) == False:
            print("Timeout ...")
        else:
            event.clear()
            print("Hi")
