develooper Front page | perl.perl5.porters | Postings from August 2021

Re: concurrency list (was Re: Relinquishing Maintenance of CoreModules)

Thread Previous | Thread Next
Dave Mitchell
August 3, 2021 12:43
Re: concurrency list (was Re: Relinquishing Maintenance of CoreModules)
Message ID:
On Mon, Aug 02, 2021 at 10:39:55AM -0700, David Christensen wrote:
>  Then threads were declared "officially discouraged".  What was
> supposed to replace threads?

I think "discouraging" threads was a mistake and we should undo it.
Since that change, people have always been confusing "discourage" with

The intent of the discouragement was more to warn people that the ithreads
threading model may not be what they were expecting (especially that data
is not shared by default).

As long as people are aware of the strengths and weaknesses of ithreads,
I see no reason why people should not continue to use it.

Note that although Jerry has given up unofficial ownership of the threads
and threads::shared modules, these were always actually owned by p5p and
will continue as before to be maintained. And in particular, the threads
module is just just a thin veneer to allow access to the underlying
ithreads in the perl core - and ithreads has has always been a core

For certain types of work, ithreads will give you full access to the
parallelism provided by multiple cores. The implementation within the core
is mature and seems mosty free of bugs (I don't recall having to track
down a race condition for a long time now).

"Foul and greedy Dwarf - you have eaten the last candle."
    -- "Hordes of the Things", BBC Radio.

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