perl-docs-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-docs/src/docs/2.0/user/coding coding.pod
Date Wed, 05 Jun 2002 17:34:26 GMT
stas        2002/06/05 10:34:26

  Modified:    src/docs/2.0/user/coding coding.pod
  Log:
  document the Apache::MPM_IS_THREADED constant
  
  Revision  Changes    Path
  1.9       +21 -1     modperl-docs/src/docs/2.0/user/coding/coding.pod
  
  Index: coding.pod
  ===================================================================
  RCS file: /home/cvs/modperl-docs/src/docs/2.0/user/coding/coding.pod,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- coding.pod	4 Jun 2002 16:41:00 -0000	1.8
  +++ coding.pod	5 Jun 2002 17:34:26 -0000	1.9
  @@ -8,7 +8,7 @@
   
   =head1 Prerequisites
   
  -=head1 TITLE_XXX
  +=head1 Goodies Toolkit
   
   =head2 Environment Variables
   
  @@ -50,6 +50,26 @@
   =back
   
   Any of these environment variables can be accessed via C<%ENV>.
  +
  +=head2 Threaded MPM or not?
  +
  +If the code needs to behave differently depending on whether it's
  +running under one of the threaded MPMs, or not, the
  +C<Apache::MPM_IS_THREADED> constant can be used. For example:
  +
  +  if (Apache::MPM_IS_THREADED) {
  +      my $id = APR::OS::thread_current();
  +      print "current thread id: $id";
  +  }
  +  else {
  +      print "current process id: $$";
  +  }
  +
  +This code prints the current thread id if running under a threaded
  +MPM, otherwise it prints the process id.
  +
  +
  +
   
   =head1 Perl Specifics in mod_perl Environment
   
  
  
  

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


Mime
View raw message