On Mon, 22 May 2006 18:09:24 -0700
Henry Jen <[EMAIL PROTECTED]> wrote:
> Davi Arnaut wrote:
> > On Mon, 22 May 2006 15:07:56 -0700
> > Henry Jen <[EMAIL PROTECTED]> wrote:
> >
> > Glimpse:
> >
> > +static apr_status_t thread_pool_cleanup(void *me)
> > +{
> > + apr_thread_pool_t *_self = me;
> > +
> > + _self->terminated = 1;
> > + apr_thread_pool_idle_max_set(_self, 0);
> > + while (_self->thd_cnt) {
> > + apr_sleep(20 * 1000); /* spin lock with 20 ms */
> > + }
> >
> > What happens to the busy threads ?
>
> Those will stop after done current task at hand with the terminated
> flag. Therefore a spin lock. :-)
Ok, I missed the apr_thread_detach call.
> >
> > +
> > + *me = apr_pcalloc(pool, sizeof(**me));
> > + if (!*me) {
> > + return APR_ENOMEM;
> > + }
> >
> > Be concise, either check all apr_pcalloc failures or none.
> >
>
> I intent to check, I spot one place I did not in thread_pool_func,
> anywhere else you noticed?
In thread_pool_construct and thread_pool_func.
--
Davi Arnaut