Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Aug 2013 14:23:28 +0200
From:      Mark Martinec <Mark.Martinec+freebsd@ijs.si>
To:        freebsd-ports@freebsd.org
Subject:   Re: Perl and Threads
Message-ID:  <201308141423.28591.Mark.Martinec%2Bfreebsd@ijs.si>
In-Reply-To: <20130814063931.72c73b6a@scorpio>
References:  <20130814063931.72c73b6a@scorpio>

next in thread | previous in thread | raw e-mail | index | archive | help
> The Perl ports offer options for "THREADS" AND "PERL_MALLOC".
> Example from the perl5.18 port:
> 
> # make showconfig
> {snip}
> ====> Exclusive OPTIONS: you can only select none or one of them
>      THREADS=off: Build threaded perl
>      PERL_MALLOC=off: Use Perl malloc
> 
> Is there any advantage to one or the other?

> I have seen ports that have options that require a threaded perl.
> Why would I not want to use at least one of the options?

There are indeed some modules in ports which require a threaded
perl. Within the set of 100 perl ports we have in use on our
servers I never got in a situation that would require a threaded
perl. Btw, not to be confused with the PTHREAD option, which is
often needed due to some underlying library needing a threads
support.

I could find the following ports which require a threaded perl:
  multimedia/p5-GStreamer
  mail/p5-Sendmail-Milter
  editors/p5-Padre
  devel/p5-SDL
  devel/p5-SNMP-Persist
  devel/p5-Glib2
(plus some dedicated modules for thread support).

Unless you need one of such modules, building a threaded perl
is just a waste for all other uses.


About PERL_MALLOC I'm not sure. With a modern memory allocator
that comes with more recent versions of FreeBSD, I'd say that
PERL_MALLOC does not bring any advantage. For a true answer
one would need to benchmark the specific application one has
in mind.

  Mark



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308141423.28591.Mark.Martinec%2Bfreebsd>