Waiting for Threads to Stop

Dale Burnett denalione at my-deja.com
Thu Jul 20 08:12:06 EDT 2000


In article <lzBd5.7626$IZ1.59773 at iad-read.news.verio.net>,
  "Doug Fort" <dougfort at downright.com> wrote:
> I have several cases where I want one thread to wait for one or more
other
> threads to terminate.  I've had poor results attempting to spin on
isAlive()
> in join().  I'm contemplating  using a  semaphore.  Has anyone got a
more
> elegant idiom?
> --
> Doug Fort
> Meat Manager
> Downright Software
> http://www.dougfort.com/~dougfort
>
>

On windows you can use the Win32 functions WaitforSingleObject, SetEvent
and CreateEvent.  If you cant or dont want to use the win32 functions,
then check out the Event Objects in the threading module.




Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list