Return-Path: Delivered-To: apmail-perl-dev-archive@www.apache.org Received: (qmail 49244 invoked from network); 13 Oct 2007 06:32:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Oct 2007 06:32:35 -0000 Received: (qmail 81920 invoked by uid 500); 13 Oct 2007 06:32:23 -0000 Delivered-To: apmail-perl-dev-archive@perl.apache.org Received: (qmail 81908 invoked by uid 500); 13 Oct 2007 06:32:23 -0000 Mailing-List: contact dev-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@perl.apache.org Received: (qmail 81897 invoked by uid 99); 13 Oct 2007 06:32:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2007 23:32:23 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gozer@ectoplasm.org designates 66.34.202.202 as permitted sender) Received: from [66.34.202.202] (HELO minerva.ectoplasm.org) (66.34.202.202) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Oct 2007 06:32:24 +0000 Received: from minerva.ectoplasm.org (localhost.localdomain [127.0.0.1]) by pmx.secure.ectoplasm.org (Postfix) with SMTP id A335F5F510; Fri, 12 Oct 2007 23:32:03 -0700 (PDT) Received: from [10.0.1.3] (S01060000b48fdfe6.vc.shawcable.net [24.86.195.146]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by minerva.ectoplasm.org (Postfix) with ESMTP id 245B95F50F; Fri, 12 Oct 2007 23:32:00 -0700 (PDT) Message-ID: <4710665F.1000809@ectoplasm.org> Date: Fri, 12 Oct 2007 23:31:59 -0700 From: "Philippe M. Chiasson" User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Torsten Foertsch CC: dev@perl.apache.org Subject: Re: Please help adding ModPerl::Interpreter References: <200710091759.35224.torsten.foertsch@gmx.net> <200710101543.33946.torsten.foertsch@gmx.net> <470D25F9.6030207@ectoplasm.org> <200710111131.36155.torsten.foertsch@gmx.net> In-Reply-To: <200710111131.36155.torsten.foertsch@gmx.net> X-Enigmail-Version: 0.95.3 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig75CA905A0A821D6995F4253C" X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.10.12.204453 X-PerlMx-Spam: Gauge=XXII, Probability=22%, Report='RELAY_IN_PBL_11 2.5, RDNS_POOLED 0, RDNS_SUSP 0, RDNS_SUSP_SPECIFIC 0, RELAY_IN_PBL 0, __BAT_BOUNDARY 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __HAS_MSGID 0, __MIME_VERSION 0, __RDNS_POOLED_2 0, __SANE_MSGID 0, __USER_AGENT 0' X-Virus-Checked: Checked by ClamAV on apache.org --------------enig75CA905A0A821D6995F4253C Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Torsten Foertsch wrote: > On Wednesday 10 October 2007 21:20, Philippe M. Chiasson wrote: >> The only question I have is wherever it's necessary to also expose the= >> following 2 items: >> >> modperl_interp_pool_t * | IV >> PerlInterpreter * | IV >> >> Especially in the current patch, what you get out will pretty much >> be a useless blessed scalar you can't do anything with. >=20 > Without these 2 lines no accessor methods would be created because the = wrapxs=20 > process obviously doesn't know how to convert it. In my first version I= had=20 > declared mip and perl as void* in=20 > xs/tables/current/Apache2/StructureTable.pm. This way I also got these = > members compiled in. But then I suspected that a source scan would neve= r=20 > generate that. Am I right? Yes, absolutely correct! > BTW, I forgot to mention, the patch creates a new map:=20 > xs/maps/modperl_structures.map. Is that OK? That's more than okay, that was the correct thing to do. >> Apart that, looks great. At this point, I'd be happy to see it go in, >> without documentation even, but at least with a minimal set of tests, >> something like: >> >> my $int =3D ModPerl::Interpreter->current; >> ok($int); >> is($int, 'ModPerl::Intereter'); >> >> ok($int->mip); >> ok($int->refcnt); >> [...] >> >> To at least cover normal usage cases. >=20 > Of course. In the meantime, I've created a threading branch here: http://svn.apache.org/repos/asf/perl/modperl/branches/threading And I've applied this change (rev 584377) as the first one in hopefully m= any more of your patches. Only change is that I added minimal tests. Note, this patch/test doesn't behave correctly with a non-threaded Apache= =2E > I need this module mainly for testing the interpreter management. The p= air=20 > ($$interp, $interp->num_requests) can be used as unique identifier for = one=20 > particular usage (the time between interp_select and interp_unselect) o= f that=20 > interpreter. >=20 > refcnt is used to check for example if creating pnotes would lock the i= nterp. >=20 > mip and perl are currently not used. They can be dropped if you think t= hat=20 > would be better It's not much work to include them, so might as well keep them in. > I am aware that if later on someone decides that a perl=20 > interface to the mip structure would be good he has to change the API. It's a change that would add to the existing API, so I wouldn't worry abo= ut that case. > But=20 > that can be documented. On the other hand mip may be a useful tool to c= heck=20 > if a vhost with +Parent has really got a separate mip. But then an inte= rface=20 > to the mip->tipool might be useful to check how much interpreters are i= n use=20 > at a certain point in time. Maybe I should provide a perl interface to = that=20 > too. Maybe, yes. At some point I remember thinking that it would have simplifi= ed things to just expose Perl interpreters to Perl, and do interpreter manag= ment in perl, but that's for another time ;-) ------------------------------------------------------------------------ Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5 http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/ --------------enig75CA905A0A821D6995F4253C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHEGZfyzKhB4jDpaURAiyJAJ9nd0zqfgba16oSnoHme8TZBlCpYACdFqUO UFqyg70ezB5mjeJM0IMfN6E= =mPpB -----END PGP SIGNATURE----- --------------enig75CA905A0A821D6995F4253C--