Perl and Threads

2013-08-14 Thread Jerry
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?

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Re: Perl and Threads

2013-08-14 Thread Mark Martinec
> 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
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"