[Python-de] threads
Mark Zoeltsch
zoeltsch at mooniewar.de
Sat Apr 27 17:45:14 EDT 2002
Hi
Ich probier gerade mit threads herum und regelmaessig stuerzt
Python ab (besser gesagt es friert total ein) nach dem dritten
ausfuehren folgender Zeilen:
import thread, time
def mythread(value):
while value < 3:
time.sleep(1)
print 'mythread:',value
value += 1
else:
print 'mythread: fertig'
raise thread.exit()
thread.start_new_thread(mythread,(0,))
meine Frage natuerlich: was mache ich falsch? fliegen da irgendwo Leichen
rum die ich nicht wegraeume? Und ist es ueberhaupt noetig das ich
raise thread.exit() explizit aufrufe?
Wenn es von Noeten ist ich: benutz Python 2.2.1c1 unter MSW2k
danke fuer jede Hilfe schonmal im voraus!
SEE yA
More information about the Python-de
mailing list