Re: CGI::Fast and ithreads.

[email protected] (Mike Pomraning)
Newsgroups perl.beginners.cgi,perl.ithreads
Message-ID <[email protected]>
On Tue, 25 Apr 2006, Eugene Kosov wrote:

> I'm writing a CGI application and am going to use ithreads in order to reduce
> execution time. Is it possible with CGI::Fast? I get segmentation fault every
> time I'm using threads with CGI::Fast.
<<SNIP>>
> [kosov@yoyo ~]$ perl test.pl
> I'm a thread.
> Segmentation fault
> 
> What's wrong? Did I forget something to do?

You forgot to tell us the versions of perl, CGI::Fast, ithreads and
underlying system you're running. :)  Others have had a similar problem,
too:

 http://www.fastcgi.com/archives/fastcgi-developers/2004-August/003439.html

FWIW, I get the same behavior under perl-5.8.4 with CGI::Fast-1.05 and
threads-1.03 atop Linux 2.4:

  $ perl -Mthreads -MCGI::Fast -e 'threads->new(sub{})->join()'
  Segmentation fault

... but that version of "threads" is so old that it's hardly a relevant data
point.  Try threads-1.23 or 1.24, available from CPAN.

I also suggest that you ``use threads'', rather than ``require'' it.

Good luck.

Regards,
Mike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.