[cpp-threads] Re: Thread API interface tweaks
Chris Thomasson
Cristom at Comcast.Net
Thu Aug 31 10:33:41 BST 2006
On 8/30/06, Howard Hinnant <hinnant at twcny.rr.com> wrote:
[...]
>> (pthread_key_*, pthread_get/set_specific) and my suggestion of thread
>> id (pthread_t, pthread_equal) appear to serve exactly the same role
>> in this example.
>Except that TSD works for process shared locks (pthread_t is process
>private).
Yes... I also use TSD for recursion in my AppCore library:
http://groups.google.com/group/comp.programming.threads/msg/011401eb846b490c
(simple example)
IMHO, using thread-local-storage for this kind of stuff is a very simple and
straightforward approach...
--
Chris Thomasson
http://appcore.home.comcast.net/
(portable lock-free data-structures)
More information about the cpp-threads
mailing list