|Perl Monk, Perl Meditation|
Re^8: Trying to Understand the Discouragement of Threadsby BrowserUk (Patriarch)
|on Nov 19, 2014 at 10:59 UTC||Need Help??|
As you can't disable access to most of that stuff, you've got to share it and once you share it, you've got to protect it and still run the risk of ending up in an inconsistent state thanks to race conditions and lack of locks.
Why would there be any "lack of locks"? You're (wrongly) assuming that the only alternative to cloning, is direct, unfettered access. It isn't.
Just as the internal state of threads::shared variables are protected now, so would the single, shared copy of the currently-cloned, process global state be so protected. It would have to be, because it would live in exactly the same context, and would be accessed in exactly the same way.
That doesn't remove the need for user locks to protect user state, but it does preclude the user from having to protect Perl's internals state.
I do not think your blame of the fork emulation is correct.
I cannot help what you think.
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.