[issue1975] signals in thread problem
Andriy Pylypenko
report at bugs.python.org
Mon Feb 4 10:54:24 CET 2008
Andriy Pylypenko added the comment:
I'm sorry I've forgotten to add one important thing to the script - the
t.setDaemon(True) call, as without it the main thread will wait for the
user thread to stop explicitly. So the correct script is:
some_time = 6000000 # seconds
class MyThread(Thread):
def run(self):
while (True):
time.sleep(some_time)
t = MyThread()
t.setDaemon(True)
t.start()
while(True):
select.select(None, None, None, some_time)
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1975>
__________________________________
More information about the Python-bugs-list
mailing list