On onsdag, juli 24, 2002, at 12:42 , Ray Hilton wrote:

> Is it correct that detached threads will only last for the duration of
> the scope of their object, such that:
>
> sub foo {
>       my $thr = threads->new(&bar);
>       $thr->detach;
> }
>
> will terminate the thread on exiting the function?  Or will it last till
> the end of the process?  Either way, it seems perl will not hang around
> for detached threads to finish off, unlike 5005 threads, not sure if
> this is a curse or a blessing yet :)
>
>

Yes, as soon as bar() exits the thread will be gone.

And no, perl does not hang around for detached threads to finish off, I 
think that it should be I was outvoted, that is life :).

However I am going to to update threads.xs with an option to wait, but I 
need some ideas on the interface, or even better, patches :-)

Arthur

Reply via email to