By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,813 Members | 1,130 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,813 IT Pros & Developers. It's quick & easy.

thread already started...

P: n/a
Hi Pythoners...

I am building a python GUI with wxpython... the python GUI will periodically call a python module written on python 2.2... wxtimer is used to enable the periodic call... it works fine when i first run the wxtimer to periodically call the python module... the problem arises when i stop the wxtimer and restart the wxtimer (restart calling periodically)...

It says : "thread already started"... the python module i called is written by other programmer and threads must have been started somewhere in the python module... if i exit from the python GUI, all threads will be stopped...

i suppose the quick solution is to stop all threads when the wxtimer is stopped...

ANY IDEA ON HOW TO STOP ALL THREADS INDEFINITELY WITHOUT CLOSING THE GUI??... python command 'sys.exit()' will exit from my main running code (the python GUI)...

Many thanks to Pythoners... I have just been introduced to python few months ago and i have now fallen in love with it...

regards
sarmin
---------------------------------
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
sarmin kho <sa********@yahoo.com> pisze:
ANY IDEA ON HOW TO STOP ALL THREADS INDEFINITELY WITHOUT CLOSING THE
GUI??... python command 'sys.exit()' will exit from my main running
code (the python GUI)...


I don't think it's possible. And even if it is possible, this would be a
bad idea, since threads may access and change some data -- forcing them
to terminate could wreak havoc on this data.

--
Jarek Zgoda
http://jpa.berlios.de/
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.