Hi All,
I've just been working on getting the mingw build of apr up and running
(based on [EMAIL PROTECTED]), it all seems to go well and i get the compiled
libraries as expected.
However when it comes to testing i notice that there are problems such
that the testmutexscope.exe fails. The output is as follows.
<quote>
Trying proc mutexes with mechanism `default'...
Mutex mechanism `default' is global in scope on this platform.
Assertion failed: rv == APR_SUCCESS, file testmutexscope.c, line 169
This application has requested the Runtime to terminate it in an unusual
way. Please contact the application's support team for more information.
</quote>
Basically what appears to be happening in that the apr_thread_join
returns APR_INCOMPLETE, this is correct as per the apr_thread_join
source code as the thread's pool is still intact (apr_thread_exit was
not called for thread cleanup). However the thread itself has exited, or
more rather then threads main function has returned.
My question comes down to the usage of apr_thread_exit(...), should all
threads prior to returning call this function, and if it does not then
is it considered a usage error? I would be inclined to change the dummy
thread function such that if the threads function registered via
apr_thread_create does return then apr_thread_exit(...) is called,
however this is more a fail safe for perhaps incorrect usage?
I myself did try to assertain whether apr_thread_exit() was infact
required to be called, however i failed and looking at the test examples
they generally do not.
Andrew