How to check if a thread is alive?

2003-11-18 Thread EastInspection USA
Hi there, In my program, one thread runs into a "die" statement, but when I use threads->list to get a list of thread ids, the "dead" thread is still there. How come? The thread is not a detached thread. version 5.8.0. screen output: thread failed to start: Tread(jade): simulated die. at poll.pl

Re: How to check if a thread is alive?

2003-11-18 Thread Elizabeth Mattijsen
At 16:20 -0500 11/17/03, EastInspection USA wrote: Hi there, In my program, one thread runs into a "die" statement, but when I use threads->list to get a list of thread ids, the "dead" thread is still there. How come? The thread is not a detached thread. Have you join()ed the thread? Liz

Re: How to check if a thread is alive?

2003-11-18 Thread EastInspection USA
Hi Liz, The main thread spawned many other threads (worker thread). If I join(0ed any of them, it will cause the main to wait for the worker thread to exit. It seems to me it is a bug in ithread. If a thread dies, then ithread->list() should not list it as an alive thread. perl ithread tutorial

Re: How to check if a thread is alive?

2003-11-18 Thread Mike Pomraning
On Tue, 18 Nov 2003, EastInspection USA wrote: > It seems to me it is a bug in ithread. If a thread dies, then > ithread->list() should not list it as an alive thread. This is a documentation ambiguity, not a bug in ithreads. :-) Some of the threads documentation is drawn from previous implemen