The python docs are pretty clear that there is no way to external stop a
thread and this was a design decision.
Typically, I have used a threading.Event to control the actions of the
worker threads from a loop in the main program.
Setup each worker thread as a loop using the event.wait() method
Jacob,
What you are looking at is called a thread pool. The simple case you
have now is that you start a thread whenever there is work to do
(playing a sound). The thread does this work, then exits. A thread
pool means you have a set number of threads idling and receiving work
via a queue. When
'...fate had broken his body, but not his spirit...'
- Original Message -
From: geoff
To: Jacob Kruger
Cc: python-win32@python.org
Sent: Thursday, October 27, 2011 3:47 PM
Subject: Re: [python-win32] Restart/re-run a thread
The python docs are pretty clear
far.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
- Original Message -
From: Ben Timby bti...@gmail.com
To: python-win32@python.org
Sent: Thursday, October 27, 2011 4:31 PM
Subject: Re: [python-win32] Restart/re-run a thread
...'
- Original Message -
From: Ben Timby bti...@gmail.com
To: Jacob Kruger jac...@mailzone.co.za
Sent: Thursday, October 27, 2011 5:34 PM
Subject: Re: [python-win32] Restart/re-run a thread
Jacob,
May be getting a bit off topic here :-). However, for 3D sound, look
for python game libraries