in reply to Threads and HTTPS Segfault

How can I work around this?

By using require instead of use, to only load LWP (and any other non-thread safe modules) in child threads only

Replies are listed 'Best First'.
Re^2: Threads and HTTPS Segfault
by BrowserUk (Patriarch) on Aug 21, 2011 at 07:19 UTC

    I seriously doubt that will help in this case. The non-theadsafe part is most likely to be in one of the XS components or their underlying C libraries and will likely manifest themselves regardless of whether the Perlish code is used then cloned into the threads or required into each thread separately.

    Working around module non-thread-safety by requireing only really works if you then only make use of the module from a single thread, which wouldn't achieve the OPs goal.


    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.
Re^2: Threads and HTTPS Segfault
by onelesd (Pilgrim) on Aug 23, 2011 at 02:42 UTC
    Thanks for this suggestion, but it didn't work. I used Thread::Use inside the threads to only load LWP there and still encountered the bug.