On Mon, Feb 6, 2017 at 6:08 PM, Mark Thomas <ma...@apache.org> wrote:
> On 06/02/17 22:55, Mark Thomas wrote:
>>
>> On 06/02/17 21:20, therealnewo...@gmail.com wrote:
>>>
>>> Mark,
>>>
>>> If there is anything I can do to help work on the patch I will,
>>> however as I mentioned in the bug I don't have a windows environment
>>> so I am basically useless if that is where the issues exist.
>>
>>
>> Yes, this is Windows.
>>
>> The problem with the original approach was that DLL_THREAD_DETACH was
>> being called for all threads - including JVM threads stopping after the
>> native library had effectively closed down. Hence the crash.
>>
>> I'm currently trying to use the same approach as used for Linux but I'm
>> not seeing the thread local being destroyed when the associated thread
>> exits. I'm still debugging why.
>>
>> Any hints, suggestions etc. welcome.
>
>
> Looking at the APR docs and source, the destructor function is only called
> when apr_threadkey_private_delete is called and I don't see that being
> called anywhere. How is this working on Linux? I suspect it isn't but I
> haven't set up a build env to confirm that at this point.
>

Looking at the apr source threadproc/win32/threadpriv.c the destructor
is actually thrown away on windows, so that approach will not work on
windows. I think what you are looking at is the TlsAlloc in create and
the TlsFree in delete, which I don't think relates to the value stored
but the key structure itself.

-nate

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to