On Tue, 11 Mar 2003, Robert E. Gruber wrote:
> I'm using apr and apr-util for a new project. I cannot figure out what
> the rules are for how threads, thread lifetimes, and pool create/destroy
> interact.
>
> For example, can thread X create a subpool S and another thread Y
> destroy S? Does thread X have to live as long as subpool S is in use,
> or can it go away without destroying S?
It depends on which pool S is a subpool of. If S is a subpool of the
thread pool for X, then X must live at least as long as S is intended to
live. X could easily create S as a subpool of the global pool or some
other process-level pool, on the other hand, at which point S's lifetime
would not depend on the lifetime of X.
--Cliff
|