httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <>
Subject Re: [Win32] Current CVS crashes on shutdown
Date Tue, 19 Mar 2002 15:23:29 GMT
On Tue, Mar 19, 2002 at 06:49:28AM -0800, Ryan Bloom wrote:
> > To protect against that we either need thread cancellation, and
> > register a cleanup with pool B that will cancel the thread if
> > the pool is destroyed.  Or, we need other means of protection
> > against double destruction (refcounting of pool users(threads)
> > comes to mind).
> The only way I see to do this is to make destruction of a thread's pool
> kill the thread.  Of course, that isn't easy to do, because the thread
> could be in a non-cancelable state.  The only other option is to kill
> the cleanup in the thread-exit code if you have already cleared the
> pool.  I am not sure how easy or hard that would be do to though.

I've always been of the opinion that we shouldn't be forcing threads to
be tied to threads. My prefered thread API is not pool aware, leaving
the app author to create and pass subpools through the opaque data to
the thread and manage their own scope or explicit destruction.

This does not directly solve the thread-shutdown problem, but it does
give the app author a little flexibility to design the shutdown however
they wish.

Another possibility would be to register a thread shutdown callback
when creating a thread.


View raw message