Boring has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, I am new to Perl. I have a problem on multithreading programming. When I want to "kill" a thread, the system return the following messages: can't locate auo/theads/kill.al in @INC(@INC contains:...) at... A thread exited while 2 threads were running. Please help. Thanks.
  • Comment on threads - can't locate auto/threads/kill.al

Replies are listed 'Best First'.
Re: threads - can't locate auto/threads/kill.al
by zentara (Cardinal) on Nov 13, 2008 at 11:38 UTC
    You may need to get the latest version of threads at threads. Also show some code, you may be using it wrong, or better off joining or detaching instead. Killing a thread is usually a last resort.
    #from the perldoc # Signal the thread to terminate, and then detach # it so that it will get cleaned up automatically $thr->kill(’KILL’)->detach();

    I'm not really a human, but I play one on earth Remember How Lucky You Are
      Hi zentara, Thank you very much. The messages are gone after update to the latest version of threads and the suggested code. Again, thank you.
Re: threads - can't locate auto/threads/kill.al
by gone2015 (Deacon) on Nov 13, 2008 at 11:36 UTC

    Hi Boring, I am hugely impressed that you are new to Perl but are diving right in at the deep end, and having a go a multithreading programming. Sadly you appear, as they say, to be drowning, not waving.

    Unfortunately, with all the splashing and shouting for help, it's difficult to say what is wrong with the backstroke (or is it butterfly ?) you are attempting...

    Once the lifeguard has fished you out, I recommend a trip to the shallow end...

    I also recommend reading How do I post a question effectively? The good monks are usually very helpful, given a question there's half a chance of answering (especially if it doesn't look like a request to do somebody's homework for them).

      Hi oshalla, Thank you for your advice, it help me a lot. I know I am drowing, but I am full of confidence that I will be OK as there are a lot of good monks here. And one of them is you. Again, thank you.