On Fri, Jan 14, 2011 at 12:45 AM, ynon perek <[email protected]> wrote:
> Hi David,
> I actually have the same feeling (something with the SSL library). According
> to the OpenSSL FAQ it is thread safe
> (http://www.openssl.org/support/faq.html#PROG1) - I'm not sure how to follow
> that lead any further.
> The problem is actually more than what LWP::Parallel could solve.
> It seems the seg-fault happens every time I use threads in the same perl as
> LWP with https (Note that the threads don't actually do anything here).
> So yeah, it's possible to use LWP::Parallel (or even POE) to get rid of the
> threads here, but this means that any time I use LWP with SSL I won't be
> able to use the threads module at all in my app ? this doesn't make sense

Threads, while working in perl itself is not really the preferred way
of doing parallel
programming in Perl. There are a number of other solutions including
fork() and POE.

One of the issues with threads that - as it has not been used too much
in the perl
world - many CPAN modules are not thread safe. I am not sure if this is the case
you encountered but you can easily encounter this issue later on. So
unless there
is some reason to stick to threads I'd probably recommend switching to
something else.
If you need to run your code on Windows then I'd probably avoid fork()
as well as
fork() is implemented as threads on Windows.


BTW this is our major concern regarding Padre which is currently using threads.
For our case though it seems none of the other solutions would work.

regards
   Gabor
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl

Reply via email to