Subj : Re: Non-strictly-conforming and unspecified versus undefined To : comp.programming.threads,comp.std.c From : Marcin 'Qrczak' Kowalczyk Date : Tue Feb 22 2005 05:11 pm Gianni Mariani writes: >>> There are >>>definite merits to having objects accessible by only a single thread. >> Such as? > > a) It can be alot faster on some platforms. Not "a lot", because thread-specific addresses can be implemented in terms of thread-specific objects with only one extra indirection. > b) Guarenteed that memory is private to a thread, reduces debugging issues. I would suppose it increases debugging issues, when the contents of the same object (e.g. examined from the debugger) depend on the thread we choose as the context. > I want the ability to specify that an object is private to a thread, > not ALL objects private to a thread. > > Please indicate where this causes a problem for you. The point is not whether this mechanism should be provided at all, but what should be the semantics of the concrete __thread keyword. -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/ .