httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@raleigh.ibm.com>
Subject Re: Which thread/process
Date Thu, 12 Aug 1999 23:04:49 GMT

Explain to me how the child garauntess that no other child server has the
same number at the same time, without some sort of child number
identification.  If the child has a child number identification, then this
whole issue is moot, and somebody just needs to tell me where it is.

I see three options.  1)Each child uses numbers within a range, but
where does the child get the range from?  2)Each child uses their pid to
generate the index, this is no good, because as soon as that child dies,
their numbers can never be repeated.  3)We use some sort of IPC to make
sure that the number desired number is available, this defeats the whole
purpose, because it will be way too slow.

What am I missing?

The idea sounds good, now just give me some idea of how to implement it,
because that's the part I am not seeing.

Ryan

On Thu, 12 Aug 1999, Manoj Kasichainula wrote:

> On Thu, Aug 12, 1999 at 10:52:56AM -0400, Ryan Bloom wrote:
> > 
> > Okay, we took out the only place in the 2.0 tree where we designated a
> > unique number for each thread within each process.  Namely, the
> > thread_num/child_num pair in the conn_rec.  So how am I now supposed to
> > get a deterministic value for the exact thread I am running in?
> 
> What you really need isn't a child_num/thread_num pair, but an
> identifier for a connection that is unique at any given point in time
> but repeats as often as possible (to minimize the number of named
> pipes).
> 
> I suggest adding an index field to conn_rec. This number is set by
> the MPM after ap_new_connection is called. This way, mod_cgid can work
> properly even in an asynchronous threaded server.
> 
> I'm guessing this field would be useful to other modules as well.
> PHP4's TSRM could possibly derive the indices it uses from
> conn_rec->index.
> 
> Thoughts?
> 
> -- 
> Manoj Kasichainula - manojk at io dot com - http://www.io.com/~manojk/
> "By 'standie,' I mean those life-sized cardboard figures that stand up. By
> 'pirate,' I mean 'Arrrrr!'" -- Steve Jackson
> 

_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	


Mime
View raw message