apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: [PATCH] WIN32 allow destructors for apr_threadkey_private
Date Tue, 22 Aug 2006 04:53:19 GMT
William A. Rowe, Jr. wrote:
> Mladen Turk wrote:
>> William A. Rowe, Jr. wrote:
>>> I had a similar issue with this proposal, and came to a different possible
>>> solution ... we could run the destructors as part of the thread return
>>> processing from our apr thread start function when the thread returns
>>> control.
>> Hmm, but this would limit the usage by threads only created with
>> apr, and in that case one can use thread attributes instead threadkey.
> Yup... as I suggested, do we care?  Can anyone point at some cases that this
> would be a realistic scenario - non-apr threads using apr threading APIs?

Sure, using APR from any VM like Java or scripting language
that has its own thread management. How about GUI apps, etc.
BTW, it is already used in Subversion.

> A related question; we should only invoke destructors for apr managed thread
> datum, right?  I think this is how your patch works, but it's a similar point.

Sure. The same way how posix pthreads works.
The descructor is called for thread when destroy by the OS with the
data added via apr_threadkey_private_add.


View raw message