apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: Pools in threads
Date Sun, 15 Jul 2001 23:43:37 GMT
On Mon, Jul 16, 2001 at 12:46:31AM +0200, Luke Kenneth Casson Leighton wrote:
> > In order to provide a win against the current pool code in a threaded
> > MPM, we *need* to have thread-specific SMS that have no locks or
> > association to anything other than a simple unlocked (from APR's
> > perspective) malloc/free (aka std) SMS.  -- justin
> 
> okay.
> 
> well... uhmmm... this is going to sound odd.  i'm not even sure
> if it will help, because i am a bit out of my depth in understanding
> the problem.
> 
> how about a 'pass-through' sms for threads?

I'm not sure I'm following you.  The thread SMS never needs locks.

Sander was under the assumption that the parent of a thread can clean up
a thread.  That isn't supported with POSIX pthreads (cleanly).
Apparently, Win32 has some support for this.  This lack basically kills
off the parent/child relationship between SMSes across threads.

pthread_cancel() gets us into all sorts of problems we don't want to 
deal with.  It has been discussed years ago between Ryan, Dean and 
Manoj - see around 08-1999 - "First in a long line of APR related 
patches".  And, it isn't guaranteed to work, either (mutex acquires 
are *not* interruptable).  In that same thread, Ryan also brings up a
precursor to SMS.  Rather interesting thread, really.  (See
www.apachelabs.org if you don't have a favorite new-httpd archive.)

Unless you have a clean way of killing off a thread from a parent,
thread-based SMS must be directly parented from a basic non-locking 
SMS (like std SMS).  

I'm open to any creative suggestions that work.  I'm just not aware 
of any that work.  -- justin


Mime
View raw message