Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by (anonymized user) (Curate)
on Aug 16, 2015 at 18:59 UTC ( #1138767=note: print w/replies, xml ) Need Help??


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

I'm sorry, but the implentation you describe was not released until 2002. But I have investigated and totally agree with your comments about that implementation being based on pthreads. So why not help everyone out and (finally) update the docs so that the rest of us have clear guidelines on when they can use it.

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. Apart from keenness to learn, a good programmer is also able to encourage his colleagues, rather than rubbish them. I wonder how this plays out in your teamwork.

One world, one people

Replies are listed 'Best First'.
Re^6: threads->create hangs (vs fork)
by BrowserUk (Pope) on Aug 16, 2015 at 19:34 UTC
    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!
Re^6: threads->create hangs (vs fork)
by (anonymized user) (Curate) on Aug 16, 2015 at 20:08 UTC
    make shit up? No the reference was CPAN http://search.cpan.org/~nwclark/perl-5.8.8/ext/threads/threads.pm - Look neither of us obviously is responsible for the accuracy of documentation on this subject. But the fact remains that threads and forks existed before Perl and the intended functionality is entirely independent of Perl or anything released in Perl whenever. All you're doing is proving that even if the implementation is reliable, it still needs better documentation. And some article somewhen doesn't cut it - either Perldoc needs updating to describe the restrictions clearly, or the implementation needs to be improved so that the warning in the docs can be removed. Surely there is no way out other than these two options although I am open to suggestions.

    One world, one people

      the reference was CPAN http://search.cpan.org/~nwclark/perl-5.8.8/ext/threads/threads.pm

      No where in this does it say: "implemented (interpreter-based) threads (i.e. without OS support)". Nor anywhere else on the 'net.

      All you're doing is proving that even if the implementation is reliable, it still needs better documentation.

      Here's an idea. Don't respond to questions based only upon your (mis)interpretation of the documentation. Stick to subjects of which you have some experience. (And forks under Multics don't count!)


      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!
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2020-10-21 22:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (223 votes). Check out past polls.

    Notices?