Hi,
I have a thread that invokes system("command") that may stuck. I can't let this thread 
die because it may take a lot of time. Example:

 threads->new(\&srun);
..
..
sub srun {
system("....");
threads->self->join;
}
I  need to kill the system command if it takes more than define timeout.

Thanks,
Igor

-----Original Message-----
From: david [mailto:[EMAIL PROTECTED]
Sent: Monday, January 19, 2004 9:15 PM
To: [EMAIL PROTECTED]
Subject: RE: threads in perl


Igor Ryaboy wrote:

> Hi
> I want to kill a specific thread and thread->list to be updated (Like
> thread->join but without waiting). Igor
> 

instead of killing a thread, why not just let the thread die when you need 
to kill it? take a look at Thread::Exit and Thread::Suspend, they let you 
kill / suspend / resume threads

david
-- 
sub'_{print"@_ ";* \ = * __ ,\ & \}
sub'__{print"@_ ";* \ = * ___ ,\ & \}
sub'___{print"@_ ";* \ = * ____ ,\ & \}
sub'____{print"@_,\n"}&{_+Just}(another)->(Perl)->(Hacker)

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to