
June 14th, 2004, 08:27 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 21
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Yeah thanks it works quite okay! Not that easy i my opinion, but it works all the same (i would have prefered something like the good old signals I used when i did some C programing that kill anything anytime...)
I'm getting to where I want to go, but I saw something very strange and I have trouble explaining it:
Code:
root = Tk()
event1 = threading.Event()
event1.set()
I have two problems in fact:
- when I put the event after the root creation, everything doesn't quit. The first thread to make the flag test does quit but then it seems the root.mainloop() starts again before all the threads do their flag test, and so the flag is set to True again...
- when i put it before, then my sub threads see the event as False as soon as they are started... so they quit right away (they do this test one in a while:
Code:
if not event1.isSet():
break
|