apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: Threads and their Pools
Date Fri, 13 Jul 2001 23:33:51 GMT
On Fri, Jul 13, 2001 at 07:20:26PM -0400, Cliff Woolley wrote:
> Semi-related to this is something I was wondering about this morning when
> I woke up, which is this: what happens if there's a per-thread allocator
> (sms) that's used as the parent of all sms's in that thread, and some
> portion of the code (maybe a module) running in that thread decides to
> spawn off some child threads?  Clearly it cannot use the per-thread sms as
> the parent sms for the pools created in the child threads.  Should it
> start over with an apr_sms_std as the parent sms for all sms's in the
> child thread?

Which is why Sander and I were tossing the idea of creating that in the
apr_thread_create function.  Ideally, the apr_thread_create function
would create a threads/trivial SMS parented by the global pool (std -
which is malloc-based) for each thread.

(Aaron prolly hates this idea.  Actually, he's sitting behind me yelling
at me for writing this...)

Now, I'm not sure how realistic this is, but that's my initial thought.
-- justin

View raw message