/[Apache-SVN]
ViewVC logotype

Revision 1884077


Jump to revision: Previous Next
Author: ylavic
Date: Thu Dec 3 20:19:40 2020 UTC (3 years, 5 months ago)
Changed paths: 9
Log Message:
apr_thread: destroy the thread's pool at _join() time, unless _detach()ed.

Destroying a joinable thread pool from apr_thread_exit() or when the thread
function returns, i.e. from inside the thread itself, is racy or deadlocky
with APR_POOL_DEBUG, with the parent pool being destroyed.

This commit adds a ->detached flag in each arch's apr_thread_t struct to track
whether a thread is detached (either at _create() or _detach() time). If
detached, the pool is destroyed when the thread exits, otherwise when the
thread is joined with apr_thread_join().


Changed paths

Path Details
Directoryapr/apr/trunk/include/arch/beos/apr_arch_threadproc.h modified , text changed
Directoryapr/apr/trunk/include/arch/netware/apr_arch_threadproc.h modified , text changed
Directoryapr/apr/trunk/include/arch/unix/apr_arch_threadproc.h modified , text changed
Directoryapr/apr/trunk/include/arch/win32/apr_arch_threadproc.h modified , text changed
Directoryapr/apr/trunk/threadproc/beos/thread.c modified , text changed
Directoryapr/apr/trunk/threadproc/netware/thread.c modified , text changed
Directoryapr/apr/trunk/threadproc/os2/thread.c modified , text changed
Directoryapr/apr/trunk/threadproc/unix/thread.c modified , text changed
Directoryapr/apr/trunk/threadproc/win32/thread.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26