Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^2: Fork and creating a thread exits the processby perlfan (Vicar) |
on Aug 11, 2020 at 15:12 UTC ( [id://11120611]=note: 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. The ideal of threadded shared libraries is certainly interesting and I think appropriate if implemented carefully in the library with mindfulness that it's going to be used by a single perl parent process and perl datastructures are in no way 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. The suggestion that Perl ithreads should not be used on Windows also seems to contradict the author of Coro's explaination (in POD of Coro) of what Perl threads are, and based on my knowledge of threads he "gets it". In fact, he indicates that ithreads is actually appropriate to some degree for Windows but completely brain dead for *nix/POSIX platforms. I offer the above simply to prevent the spread of false information, I am open to being wrong and would appreciate constructive correction in any form.
In Section
Seekers of Perl Wisdom
|
|