Loading ...
Sorry, an error occurred while loading the content.

threads in perl

Expand Messages
  • cicbaba
    Hi, I need help in simple threaded solution. How can I join the active thread? After I was started the thread I want him to join itself at the end and go back
    Message 1 of 1 , Oct 8, 2003
    View Source
    • 0 Attachment
      Hi,
      I need help in simple threaded solution.
      How can I join the active thread?

      After I was started the thread I want him to join itself at the end
      and go back to the main
      Example:

      # main program
      $thr1=new threads \&sub_name;
      $thr2=new threads \&sub_name;
      $thr3=new threads \&sub_name;
      $thr4=new threads \&sub_name;

      # threaded subroutine
      sub sub_name{
      print ("\nIn the thread!\n");
      # here I need help to join this thread after the print

      }

      I need that every started therad will be killed after finished and
      thread->list to be updated


      Thank you all,
      Igor
      Please email me to igor.ryaboy@...
    Your message has been successfully submitted and would be delivered to recipients shortly.