On Sun, 2 May 2004, Thomas S Brettin wrote:

> Is there an easy way to stop a thread from outside the thread? I'ld like
> to do something simple like:
>
> my $thread = threads->new($code_ref);
> ...
> $thread->stop();
>
> Thanks for any help.

There's no notion of 'thread cancellation' in perl.  If you can run
Thread::Signal (see that module's CAVEATS), then Thread::Stop offers a kill()
method which behaves as you expect.

-Mike
-- 
Michael J. Pomraning
[EMAIL PROTECTED]
http://pilcrow.madison.wi.us

Reply via email to