At 02:51 PM 4/23/00 +0200, Gerald Richter wrote:
> >
> > So, does that still leave mod_perl serializing access until
> > everything is rewritten to be thread-safe?
> >
>
>No, mod_perl 2.0 assign a "full" Perl interpreter to every Apache thread. So
>the Perl modules itself need not to be thread safe. Perl 5.6 has some nice
>features to clone a Perl interpreter in a efficent way (syntax tree of
>modules (loaded before clone) is used by all cloned Perl interpreters, while
>the data is separate for all cloned Perl interpreters). mod_perl 2.0 get
>manages a pool of cloned Perl interpreters which is assigns as neccessary to
>the Apache threads.

In the end, there may still be some threading issues that should be watched 
out for I suspect. If mod_perl 2.0 follows a similar design to 
ActiveState's PerlEx, PerlEx also has some problems when the Perl modules 
themselves link to stuff that is not threadsafe as a shared library.

eg, every 2 weeks or so, the PerlEx mailing list has someone post "I get 
mysterious crashes with Win32::ODBC"... and the perennial  reply of "Don't 
use that module with PerlEx as it's not threadsafe"...

I don't know if there is anything else that might cause a similar problem.

Later,
    Gunther


Reply via email to