Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^6: threads->create hangs (vs fork)

by BrowserUk (Patriarch)
on Aug 16, 2015 at 19:34 UTC ( [id://1138769]=note: print w/replies, xml ) Need Help??


in reply to Re^5: threads->create hangs (vs fork)
in thread threads->create hangs

I'm sorry, but the implentation you describe was not released until 2002.

Really? Then how do you account for all the pthread references in this code from Perl 5005 released 1998:

And this from perl 5.6.0 released March 2000:

See the README.threads in the main perl 5.004_xx development distribution (x >= 50) for details of how to build and use this. If all else fails, read on. If your version of patch can't create a file from scratch, then you'll need to create an empty thread.h manually first. Perl itself will nee +d to be built with -DUSE_THREADS yet. If you're using MIT pthreads or another threads package that needs pthread_init() to be called, then add -DNEED_PTHREAD_INIT. If you're using a threads library that only follows one of the old POSIX drafts, then you'll probably need to add -DOLD_PTHREADS_API. I haven't tested -DOLD_PTHREADS_API properly yet and I think you may still have to tweak a couple of the mutex calls to follow the old API. This extension is copyright Malcolm Beattie 1995-1997 and is freely distributable under your choice of the GNU Public License or the Artistic License (see the main perl distribution). Malcolm Beattie mbeattie@sable.ox.ac.uk

The only way in which you are right -- and its a stretch -- is that the first attempt at providing threading in Perl -- the one above; which also used OS kernel threading: pthreads on *nix and OS threads on Windows and OS/2 -- was "very experimental" and was immediately replace by the iThreads implementation.

Update: Caveat: assuming it is reliable enough. However, in regard to "clearly have nothing useful...please refrain" On second thoughts, someone with such arrogance is an unsafe contributor to the docs. To teach, one must first sincerely have sufficient character to learn.

I'm very capable of learning; just not from people who make shit up and pass it off as knowledge.

And if you want to challenge that conclusion and "educate me"; then simply post a link to the authoritative place where you learnt that: "So Perl boldly went and implemented (interpreter-based) threads (i.e. without OS support),"

What you take as "arrogance" is simply 'well founded and proven knowledge'. Ie. The knowledge to see through BS.


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". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (9)
As of 2024-04-18 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found