home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / ext / Thread / join.t < prev    next >
Text File  |  1999-07-20  |  268b  |  12 lines

  1. use Thread;
  2. sub foo {
  3.     print "In foo with args: @_\n";
  4.     return (7, 8, 9);
  5. }
  6.  
  7. print "Starting thread\n";
  8. $t = new Thread \&foo, qw(foo bar baz);
  9. print "Joining with $t\n";
  10. @results = $t->join();
  11. print "Joining returned ", scalar(@results), " values: @results\n";
  12.