perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [mp2] Win32 apache2 "Restarting" under load
Date Sun, 05 Dec 2004 04:58:41 GMT
Stas Bekman wrote:

> I'll give you a simple technique how to know for sure whether a given 
> Perl/XS module is *not* thread-safe. grep its unpacked source for the 
> CLONE function. If it doesn't have one, it's not thread-safe. 100%!

that's not 100% correct. It's only correct if the XS returns something 
that points to a C data. If it's something that is totaly in Perl domain 
(e.g. a string variable), then it's perfectly fine not to have the CLONE 
function and still having the module thread-safe. but if it [XS 
function/method] returns an object or a handle that internally points to a 
C data, then it's certainly thread-unsafe w/o a properly [1] written CLONE 
function.

[1] http://apache.org/~stas/Example-CLONE-0.02.tar.gz

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message