You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Stas Bekman <st...@stason.org> on 2005/04/20 00:57:01 UTC

[mp2 patch] please test this on win32 (CLONE_SKIP)

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


Re: [mp2 patch] please test this on win32 (CLONE_SKIP)

Posted by Stas Bekman <st...@stason.org>.
Steve Hay wrote:
> Stas Bekman wrote:
> 
> 
>>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.
>>
> 
> No - ithreads.t still crashed Apache.exe :(
> 
> Setup: apache 2.0.54, bleadperl (@24257), svn mp2 (@162019) + your patch.

Thanks Steve.

One thing I need to verify is whether I've covered all classes. Let's wait 
till the new special branch is setup and we will work on that there.

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


Re: [mp2 patch] please test this on win32 (CLONE_SKIP)

Posted by Steve Hay <st...@uk.radan.com>.
Stas Bekman wrote:

>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.
>
No - ithreads.t still crashed Apache.exe :(

Setup: apache 2.0.54, bleadperl (@24257), svn mp2 (@162019) + your patch.



------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files transmitted with it are confidential and intended for the addressee(s) only.  If you have received this message in error or there are any problems, please notify the sender immediately.  The unauthorized use, disclosure, copying or alteration of this message is strictly forbidden.  Note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Radan Computational Ltd.  The recipient(s) of this message should check it and any attached files for viruses: Radan Computational will accept no liability for any damage caused by any virus transmitted by this email.


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