Are threads possible in 5.6.1

B

billy

I don't have to ability to request the upgrade of perl, so I'm stuck
with 5.6.1
How can I do threads?

The threads.pm is not installed, even if it does support it.
I've done perl -V and get :
....
archname=PA-RISC1.1-thread-multi
....
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lnsl -lnm -lndbm -lmalloc -ldld -lm -lpthread -lc -lndir
-lcrypt -lsec
perllibs=-lnsl -lnm -lmalloc -ldld -lm -lpthread -lc -lndir -lcrypt
-lsec
libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a


This leads me to believe it is compiled for threads, just not the
module installed.
I pulled threads-1.23 from CPAN but it states that it needs 5.8+

Which version does work for 5.6.1
 
T

Tom Regner

billy said:
I don't have to ability to request the upgrade of perl, so I'm stuck
with 5.6.1
How can I do threads?
[...]

AFAIK you can't - the module POD clearly states "[...]Prior to perl 5.8 this
has only been available to people embedding perl[...]";

You may want to look at forks[1] and it's cousin forks::BerkeleyDB[2], which
allow you to use the threads API without actualy having threads installed.

regards,
Tom

[1] http://search.cpan.org/author/RYBSKEJ/forks-0.18/
[2] http://search.cpan.org/author/RYBSKEJ/forks-BerkeleyDB-0.01/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top