question
[email protected] ("Collins, Ellen \(RSCH\)")
| Newsgroups | perl.ithreads |
|---|---|
| Message-ID | <75C2D9261DF7E14D94A5501D8DE50307065257E7@mlnya281sr.amrs.win.ml.com> |
I am running perl.5.8.7. My script is attached. It does not run asynchronously. The commands execute one at a time. Does this work on windows? I am using windows 2000. Any help is much appreciated since I have spent much time on this problem. THANKS! <<test2.pl>> ___________________________________________ > Ellen Seebeck > Vice President > Merrill Lynch- Mortgage Research > World Financial Center, N.Y. > (212)449-1690- work > (732)681-7125- home > > -------------------------------------------------------- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ --------------------------------------------------------
test2.pl
(application/octet-stream, 535 B)
use Config;
use threads;
$Config{useithreads} or die "Recompile Perl with threads to run this program\n";
if ( $Config{useithreads} ) {
printf("THREADED\n");
} else {
printf("NOT threaded\n");
}
$thr1=threads->new(&sub1);
$thr2=threads->new(&sub2);
# clean up the threads
$thr1->detach;
$thr2->detach;
exit(0);
###### SUBROUTINES #########
sub sub1 {
printf("made it to sub1\n");
system("cscript open_test.vbs 1");
}
sub sub2 {
printf("made it to sub2\n");
system("cscript open_test.vbs 2");
}