[bcn-pm] Threads

pancake pancake at phreaker.net
Tue Nov 25 12:30:51 CST 2003


si, pero s lo q t dic, he de crear el protocol de comunicacio entre els pids i realment no cal fer tanta cosa, quan lo unic q vull sq els dos comparteixin memoria, variables ,etc.

ara acabo de fer el paquet de perl 5.9 per pkgsrc amb suport per threads, quan ho provi ja us dire q tal...si esteu interessats el paquet esta al cvs de pkgsrc-wip (pkgsrc-wip.sf.net) ..si no el coneixeu...faig una mica d'spam...pkgsrc es un sistema de ports portable entre SO i arquitectures, actualment te uns 6000 paquets i creix molt ràpid. Jo ara el faig servir en netbsd i linux, pero funciona dpm en solaris,irix,darwin,hurd (aquest ultim vaig ser jo qui va fer el patch pq rules).

I per montar servidors es el millor sistema de paquets q conec.

Pos esu, lo dels threads: q he probat en linux(gentoo),openbsd(3.4),freebsd(5-1) i NetBSD(ZF) i nana q cap compila el perl amb suport per threads. quan acabi de compilar us explico.

[255:~]$ perl -V| grep th
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    ld='cc', ldflags ='-Wl,-R/usr/pkg/lib  -Wl,-rpath,/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/pkg/lib'
    libpth=/usr/pkg/lib /usr/lib
Characteristics of this binary (from libperl): 
[0:~]$ uname -a
NetBSD pl2 1.6ZD NetBSD 1.6ZD (PANCAKE_LAPTOP) #1: Sun Oct 26 02:32:21 UTC 2003  root at pl2:/usr/src/sys/arch/i386/compile/PANCAKE_LAPTOP i386
[0:~]$ 

[0:~]$ echo "use threads;"|perl -
- line 1:

This Perl hasn't been configured and built properly for the threads
module to work.  (The 'useithreads' configuration option hasn't been used.)

Having threads support requires all of Perl and all of the XS modules in
the Perl installation to be rebuilt, it is not just a question of adding
the threads module.  (In other words, threaded and non-threaded Perls
are binary incompatible.)

If you want to the use the threads module, please contact the people
who built your Perl.

Cannot continue, aborting.
BEGIN failed--compilation aborted at /usr/pkg/lib/perl5/5.8.0/i386-netbsd/threads.pm line 28.
Compilation failed in require at - line 1.
BEGIN failed--compilation aborted at - line 1.


pop

On Tue, 25 Nov 2003 17:16:15 +0100
Francesc Guasch <frankie at etsetb.upc.es> wrote:

> pancake wrote:
> 
> > Actualment em conecto a jabber a través d'un client escrit per mi en perl amb Net::Jabber i forko el procés per tal de handlejar els paquets d'entrada i els de sortida, fins ara tot bé, el problema esta enque necessitaria comunicació entre el pare i el fill i crear un protocol, IPCs , etc per passar les dades q m calguin em sembla algo estupid existint threads.
> 
> Has pensat en fer-ho amb una named pipe ?
> 
> 
> _______________________________________________
> llista dels Barcelona-pm
> Barcelona-pm at mail.pm.org
> http://mail.pm.org/mailman/listinfo/barcelona-pm
> BCN Perl Mongers: http://barcelona.pm.org



More information about the Barcelona-pm mailing list