[Tutor] How to force stop a thread
Amit Sethi
amit.pureenergy at gmail.com
Sat Jul 25 02:27:42 CEST 2009
Hi ,
I am trying to implement python threads in a gtk based app . Now the
thing is that in the application I have to fetch a lot of data from
various sources from web. During this time I wish to show a dialog
that indicates it to the user . During the same time I want to fetch
data as well . Now to implement this I have done:
a=Wait_dialog()
gtk.gdk.threads_init()
lock=thread.allocate_lock()
thread.start_new_thread(show_dialog,(lock,a))
thread.start_new_thread(fetch,(lock,a))
Now I wish to stop the thread that shows the dialog so I can destroy
the dialog and continue with normal app
I am not able to understand how to do that ... Also is this the best
way to do this kind of thing???
--
A-M-I-T S|S
More information about the Tutor
mailing list