|
I would like to call other Perl scripts in order to perform a contention test from with a main Perl script.
Something like this currently works:
system("perl 1.pl"); system("perl 2.pl"); exit;
However, I would like to kick these off as independent threads...
Started by geoffrobinson on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Use threads; $thr1 = threads->create('msc', 'perl 1.pl'); $thr2 = threads->create('msc', 'perl 2.pl'); $thr1->join(); $thr2->join(); sub msc{ ## make system call system script (unix only) would look something....
|
|
I have a multithreded application in perl for which I have to rely on several non-thread safe modules, so I have been using fork() ed processes with kill() signals as a message passing interface.
The problem is that the signal handlers are a bit erratic...
Started by dsm on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Have a look at http and can help you avoid non-thread-safe modules by confining activity to a single Perl interpreter , a "drop-in replacement for Perl....
From perl 5.8 onwards you should be looking at the core threads module.
|
|
So I'm running perl 5.10 on a core 2 duo macbook pro compiled with threading support: usethreads=define , useithreads=define . I've got a simple script to read 4 gzipped files containing aroud 750000 lines each. I'm using Compress::Zlib to do the uncompressing...
Started by ennuikiller on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
If you have four threads competing stay near that file, and the disk....
I'm not prepared to assume that you're I/OMy guess is the bottleneck for GZIP operations is disk access .
Generally - threads in Perl and not really good.
Module.
|
Ask your Facebook Friends
|
In the course of testing the code for the question How can I store per-thread state between calls in Perl? I noticed that the first I time execute the script the threads execution are fairly well interleaved with each other. But on all subsequent executions...
Started by Robert S. Barnes on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Keep in mind that yield in Perl threads is just a suggestion, which is ....
Your threads are running in creation order largely due to implementation details in Perl (or make the threads do some real work).
Differently.
|
|
I'm running a bunch of perl based web apps under apache, and mod_perl requires apache to be compiled with -threads
I'm also runnning mediawiki (which uses PHP). PHP requires Apache to be compiled with +threads.
Any suggestions to help me solve this?
Cheers...
Started by trooper_ryan on
, 11 posts
by 6 people.
Answer Snippets (Read the full thread at gentoo):
Mod_perl....
The don't use it probably threads and if you have built apache without threads php must not be built with threads.
"ithreads" are perl threads whereas "threads" are usually posix threads.
|
|
Has anybody found a good solution for lazily-evaluated lists in Perl? I've tried a number of ways to turn something like
for my $item ( map { ... } @list ) { }
into a lazy evaluation--by tie-ing @list, for example. I'm trying to avoid breaking down and...
Started by Axeman on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Use an iterator or consider using Tie::LazyList from CPAN excellent book Higher... .
To the thread results to make the Perl program flow more like map , but so far, I like my API of introducing a tie is as close as you can get in Perl 5.
|
|
Hiya. I', using Gentoo linux. it seems that i cannot emerge/install mod_perl with a threaded apache2 so i would like to know what's the pros and cons of using the worker module of apache2 with cgi-perl and using the prefork module of apache2 with mod_...
Started by ufk on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
Devs have gone through great effort to make mod_perl2 work with apache2 + threads, but the threadIMHO, prefork+mod_per would be much faster, but asking in mod_perl mailing list would give you more exact answer
On Linux, use prefork apache....
|
|
While running a perl program I encountered the following error
*** glibc detected *** perl: double free or corruption (!prev): 0x0c2b7138 *** /lib/tls/i686/cmov/libc.so.6[0xb7daea85] /lib/tls/i686/cmov/libc.so.6(cfree+0x90)[0xb7db24f0] perl(Perl_pregfree...
Started by Neer on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
You need to run Perl with the version of glibc with which it was compiled....
I think your problem is probably due to a code problem that isn't caught by perlThe most likely cause is an incompatible version of glibc .
With 5.8.8 and threads.
|
|
I have a Perl module that I would like to use from Java. Is there a way to call this code using either ActiveState Perl on Windows or the generic Perl that comes with Linux? I have found references to JPL but it doesn’t appear to be maintained anymore...
Started by Jared on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Typically, what is required is Perl with MULTIPLICITY, and threads compiledInline-Java is the usual library to call java from Perl, and this post propose a org.perl.java module which should allow calling Perl from....
Will work.
|
|
I'm trying to compile Perl 5.10 on my FreeBSD 7.1 (BSD) server but when I run the Configure script and answer the questions I get the following error:
...POSTIX threads should be supported by FreeBSD 7.1 ... but your system is missing the shared libc_...
Started by gvkv on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
A min of FreeBSD 7.1 then you failed to install the threads libraries or the thread libs the thread safe version of perl natively, however, they do package perl 5.10 and several later with FreeBSD
http://www.nabble.....
|