Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

>>As to why your code fails? I suspect the use of an XS module that doesn't support multithreading.

>I am not confident that this is correct. Based on my understanding if ithreads, it's not traditional light weight threads (e.g., pthreads), so there is no possibility of the threadsafeness of the shared library being tested. ...

From the threads documentation:

Since Perl 5.8, thread programming has been available using a model called *interpreter threads* which provides a new Perl interpreter for each thread, and, by default, results in no data or state information being shared between threads.

So, perl threads are just a thin layer over the C interface to the OS implementation of threads, with the heavyweight copy-everything step added. There's nothing I see there that would cause a previously thread-safe library to no longer be thread safe.

>There seems to be a severe lack of familiarity in the Perl community with what "real" threads are wrt "multithreading". No doubt this is not lost of many, but I continue to see over and over again the suggestion that Perl ithreads are related to traditional shared memory threads. This is simply not the case.

Lack of familiarity with the concept of "threads" or lack of familiarity with a particular implementation of "threads"? The concept of threads is easy, but threads are hard to use for everyone, unless someone has already abstracted it away for them.


In reply to Re^3: Fork and creating a thread exits the process by jeffenstein
in thread Fork and creating a thread exits the process by fluks

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2024-04-19 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found