Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^5: what the history behind perl not having "real" threads

by dave_the_m (Parson)
on Feb 26, 2013 at 22:17 UTC ( #1020771=note: print w/ replies, xml ) Need Help??


in reply to Re^4: what the history behind perl not having "real" threads
in thread what the history behind perl not having "real" threads

I think it's a shame that they gave up on the 5.0005 style threading
Well, lots of very smart people decided it was impossible to make work safely.

Note that the linux kernel is a different beast. It has a few well-defined entry points, and it is (relatively) easy to make concurrency initially fairly restrictive, and gradually increase it as code is audited and reworked. With the perl internals, you have XS code that can more or less do anything to anything in memory. Every single thing in the perl internals (and XS code) must be completely thread-safe before you can allow threads to take charge. (Ok I'm simplifying a bit, but you get the general idea.)

Anyway, I'm bored of discussing this now,

Dave.


Comment on Re^5: what the history behind perl not having "real" threads
Re^6: what the history behind perl not having "real" threads
by perl-diddler (Hermit) on Feb 27, 2013 at 20:54 UTC
    Dave M yawned, and wrote:
    Anyway, I'm bored of discussing this now,
    Don't feel a need to respond but something to think about -- device drivers in the linux kernel as well as modules (many of which can be built in statically or loaded dynamically), all had to be thread safe to be usable in the new kernel.

    You made an interesting point that all of the 'XS' code (i.e. the binary parts of the modules) had to be thread safe before the perl could allow threads to run. Perhaps it isn't as important, but in the kernel, it was the responsibility of the 'modules' to be thread safe in an SMP kernel, the kernel going 'SMP', wasn't held up going forward unless those modules were an essential part of the core.

    It seemed, essentially that it was the responsibility of the modules to become thread safe and follow the lead of the kernel than for the kernel to wait for all the modules to become 'thread' safe. If the latter had been the case, SMP, likely, would never have happened. Dunno if that's what happened w/perl or not, but there does seem to be an inordinate amount of pressure to maintain legacy compatibility at the expense of forward progress of the language.

    This has so much been the case that 1) it became required for "forward progress" to become a separate, new project, and 2) has split development resources sufficiently to create questions of sustainability of the language, besides slow the development of the language.

    The latter has, IMO, at least in part, been responsible for some not-insignificant amount of defections to other languages even though some of those other languages have gone through significant growing pains (such as incompatible releases (python)).

    However, it's unlikely that any other course would have been possible in the perl community. Can you really see people with strong opinions, like Linus, surviving long in the p5p community?

      This has so much been the case that 1) it became required for "forward progress" to become a separate, new project, and 2) has split development resources sufficiently to create questions of sustainability of the language, besides slow the development of the language.

      The requirement for legacy compatibility is as much about incumbent control, as it is about not breaking old code.

      The big fish in small ponds are rarely up for opening the flood gates and letting the small fry in.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1020771]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-08-31 09:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (294 votes), past polls