httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <>
Subject Re: Which thread/process
Date Thu, 12 Aug 1999 15:23:55 GMT

> > 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?
> Pthreads has a pthread_self() function which you perhaps want to use.  Or you
> can use TSD and save there a unique number at thread creation time.

Sorry, I should have mention this.  I would rather not use pthread_self if
I can help it.  Because going that route means I have to call both
getpid() and pthread_self() EVERY time a cgi is requested.  This can get 
expensive quickly.

Sorry, but I don't know what TSD is.


Ryan Bloom
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.	

View raw message