perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject [mp2 patch] please test this on win32 (CLONE_SKIP)
Date Tue, 19 Apr 2005 22:57:01 GMT
Randy, Steve, please build blead-perl @24247 or higher, then apply this 
patch and see if the crashes in the tests with threads go away.

Dave Mitchell has equipped perl with a new mechanism to avoid object 
cloning, which is invoked by defining:

   sub CLONE_SKIP { 1 }

in each class that doesn't want its objects to be cloned.

Index: xs/ModPerl/Const/Const.pm
===================================================================
--- xs/ModPerl/Const/Const.pm	(revision 161957)
+++ xs/ModPerl/Const/Const.pm	(working copy)
@@ -38,6 +38,8 @@
      __PACKAGE__->bootstrap($VERSION);
  }

+sub CLONE_SKIP { 1 } # mp2 API is not perl-ithread-clonable
+
  sub import {
      my $class = shift;
      my $arg;
Index: xs/APR/APR/APR.pm
===================================================================
--- xs/APR/APR/APR.pm	(revision 161957)
+++ xs/APR/APR/APR.pm	(working copy)
@@ -30,5 +30,7 @@
      *APR::XSLoader::BOOTSTRAP = sub () { 1 };
  }

+sub CLONE_SKIP { 1 } # mp2 API is not perl-ithread-clonable
+
  1;
  __END__
Index: xs/APR/Const/Const.pm
===================================================================
--- xs/APR/Const/Const.pm	(revision 161957)
+++ xs/APR/Const/Const.pm	(working copy)
@@ -23,4 +23,6 @@

  XSLoader::load(__PACKAGE__, $VERSION);

+sub CLONE_SKIP { 1 } # mp2 API is not perl-ithread-clonable
+
  1;
Index: xs/APR/PerlIO/PerlIO.pm
===================================================================
--- xs/APR/PerlIO/PerlIO.pm	(revision 161957)
+++ xs/APR/PerlIO/PerlIO.pm	(working copy)
@@ -26,5 +26,6 @@
  use APR::XSLoader ();
  APR::XSLoader::load __PACKAGE__;

+sub CLONE_SKIP { 1 } # mp2 API is not perl-ithread-clonable

  1;
Index: xs/Apache2/Const/Const.pm
===================================================================
--- xs/Apache2/Const/Const.pm	(revision 161957)
+++ xs/Apache2/Const/Const.pm	(working copy)
@@ -22,4 +22,6 @@

  XSLoader::load(__PACKAGE__, $VERSION);

+sub CLONE_SKIP { 1 } # mp2 API is not perl-ithread-clonable
+
  1;

  # returns how many ancestor generations the pool has (parent,
Index: lib/ModPerl/WrapXS.pm
===================================================================
--- lib/ModPerl/WrapXS.pm	(revision 161957)
+++ lib/ModPerl/WrapXS.pm	(working copy)
@@ -639,6 +639,8 @@
  our \$VERSION = '$version';
  $loader\::load __PACKAGE__;

+sub CLONE_SKIP { 1 } # mp2 API is not perl-ithread-clonable
+
  $code

  1;

-- 
__________________________________________________________________
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