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

Re: RFC: add discouragement warning to perl threads documentation

Thread Previous | Thread Next
Elizabeth Mattijsen
March 2, 2014 11:16
Re: RFC: add discouragement warning to perl threads documentation
Message ID:
On 02 Mar 2014, at 07:09, Aristotle Pagaltzis <> wrote:
> * Christian Walde <> [2014-03-01 21:50]:
>> Feel free to bikeshed or merge. :)
> After clarification on IRC about the contentious item I believe you
> wanted to say something like this:
>  * complex data structures are hard to share properly
>    Variables shared between threads needs to be flagged, but there is
>    no way to mark complex data structures as shared at once. So it is
>    easy to fail to share them completely, which results in hard-to-find
>    bugs and exceptions.

+1 from me.

Additionally, maybe it would be an idea to mention the module on CPAN as an alternative on non-Windows systems?  It provides an almost identical threads API (last time I checked), without the disadvantage of the copying needed to start a thread.  Since 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).

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About