Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 56755 invoked by uid 500); 9 Jul 2001 06:23:53 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 56726 invoked from network); 9 Jul 2001 06:23:51 -0000 Date: Sun, 8 Jul 2001 23:23:56 -0700 (PDT) From: dean gaudet To: "Roy T. Fielding" cc: , Subject: Re: multithreaded pools? In-Reply-To: <20010708223610.A912@waka.ebuilt.net> Message-ID: X-comment: visit http://arctic.org/~dean/legal for information regarding copyright and disclaimer. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Sun, 8 Jul 2001, Roy T. Fielding wrote: > The last time I looked at the pool code it was bogus because clean_child_exit how can clean_child_exit ever hope to work in a multithreaded server without async notification? in particular, what happens when modules start creating their own thread pools within the server to do their own specific stuff? i don't see how my change would make it any worse. at least for the httpd threads you know how to tell them all to finish up and die, and on the way out they happen to destroy their pools. so that handles all those new pool roots. (i'm not sure if clean_child_exit does this at all currently.) if clean_child_exit goes happily waltzing all over data in pools that are in use by other threads without first killing the other threads then we're just asking for segfaults, or even worse: data corruption (such as calling a cleanup on something which was unregistered). there's race conditions left and right. you'd kind of have to lock everything always... and then you'd have to deal with deadlocks on the way out of clean_child_exit (not to mention a lack of performance). -dean