Right now I have a thread that sleeps for sometime and check if an
event has happened and go back to sleep. Now instead I want the thread
to sleep until the event has occured process the event and go back to
sleep. How to do this?
thanks
mark
class eventhndler(thr eading.Thread):
def __init__(self):
threading.Threa d.__init__(self )
def run(self):
while True:
time.sleep(SLEE PTIME)
''''do event stuff'''
event has happened and go back to sleep. Now instead I want the thread
to sleep until the event has occured process the event and go back to
sleep. How to do this?
thanks
mark
class eventhndler(thr eading.Thread):
def __init__(self):
threading.Threa d.__init__(self )
def run(self):
while True:
time.sleep(SLEE PTIME)
''''do event stuff'''
Comment