develooper Front page | perl.perl5.porters | Postings from March 2014

Re: RFC: add discouragement warning to perl threads documentation

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
March 2, 2014 18:53
Subject:
Re: RFC: add discouragement warning to perl threads documentation
Message ID:
CAHhgV8imPbey3azBiWEF5BdKAvOmDTKp_Otkjfrs+fnvHBM4Gw@mail.gmail.com
On Sun, Mar 2, 2014 at 7:00 PM, Victor Efimov <victor@vsespb.ru> wrote:

> 2014-03-02 15:15 GMT+04:00 Elizabeth Mattijsen <liz@dijkmat.nl>:
> > [cut] Since forks.pm uses fork() to start a new thread, it uses the
> OS's COW system to copying things only when needed.  This results in faster
> thread starts and lower memory consumption.  At the expense of slower
> inter-thread communication (such as updating shared variables).
> >
> >
> so, threads data sharing _can_ be faster than fork+pipes? I thought the
> opposite
> http://www.nntp.perl.org/group/perl.perl5.porters/2013/08/msg206633.html
> http://www.nntp.perl.org/group/perl.perl5.porters/2013/08/msg206698.html
>

That's comparing apples and oranges, really. A shared variable is a much
higher level feature than a pipe.

Leon

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About