>From the command line, it works very well. We are impleminting a very complex digital library system. In same cases, we want to start parallel threads in order to minimize the wait. Let me try to explain with an example.
'A' start 4 threads, each of which prepares, and sends a request to another server, and then collects its result. When all threads will be terminated, 'A' will merge the 4 results. Is now more clear? -----Messaggio originale----- Da: Stas Bekman [mailto:[EMAIL PROTECTED]] Inviato: mercoledi 17 luglio 2002 00.13 A: Pasquale Pagano Cc: [EMAIL PROTECTED] Oggetto: Re: worker thread Pasquale Pagano wrote: > We are trying to use: > 1) Apache 2.0.39 compiled with the option --with-mpm=worker > 2) with modperl 2.0 > under Sun Solaris 2.8 with Perl 5.8 RC2. > > Although everything seems to work fine, the creation of a custom worker > thread takes more or less 2 minutes. > > Here below a section of the code used: > > my $t1 = new Thread(\&my_thread,'t1'); > my $t2 = new Thread(\&my_thread,'t2'); > > $t1->join(); > $t2->join(); > > sub my_thread{ > my $name = shift; > print "I'm $name\n " > return "$name: done\n"; > } > > In the example above, each new thread call takes about 2 minutes. May I ask, why do you create these threads? Under worker you already have the threads created for you and and the perl interpreters handed to you when you need them. BTW, what happens if you run the same code from the command line? __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com