473,503 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

thread already started...

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
1 2329
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1418
by: R. Rajesh Jeba Anbiah | last post by:
----------------------------------------------------------------- This is the FAQ thread where the FAQ compilation project goes. * If you wish to improve the contents, please copy the whole...
0
1491
by: Janwillem Borleffs | last post by:
----------------------------------------------------------------- This is the FAQ thread where the FAQ compilation project goes. * If you wish to improve the contents, please copy the whole...
0
1295
by: Janwillem Borleffs | last post by:
----------------------------------------------------------------- This is the FAQ thread where the FAQ compilation project goes. * If you wish to improve the contents, please copy the whole...
0
1601
by: Janwillem Borleffs | last post by:
----------------------------------------------------------------- This is the FAQ thread where the FAQ compilation project goes. * If you wish to improve the contents, please copy the whole...
3
2245
by: R. Rajesh Jeba Anbiah | last post by:
----------------------------------------------------------------- This is the FAQ thread where the FAQ compilation project goes. * If you wish to improve the contents, please copy the whole...
31
2434
by: AlexeiOst | last post by:
Everywhere in documentation there are recommendations to use threads from thread pooling for relatively short tasks. As I understand, fetching a page or multiple pages (sometimes up to 50 but not...
7
2684
by: Ivan | last post by:
Hi I have following problem: I'm creating two threads who are performing some tasks. When one thread finished I would like to restart her again (e.g. new job). Following example demonstrates...
9
3050
by: mareal | last post by:
I have noticed how the thread I created just stops running. I have added several exceptions to the thread System.Threading.SynchronizationLockException System.Threading.ThreadAbortException...
0
1187
by: Sir Spamallot | last post by:
Hi there, Previously when handling the termination of threads I had just called the abort method and caught it in a try catch block in the thread callback. After recently learning that this was...
34
2749
by: Creativ | last post by:
Why does Thread class not support IDisposable? It's creating quite some problem. Namely, it can exhaust the resource and you have not control over it.
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5570
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4998
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
373
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.