[omniORB] thread specific data construct in omni_thread

Sai-Lai Lo S.Lo@uk.research.att.com
20 Aug 1999 10:40:19 +0100


>>>>> David Riddoch writes:

> On Fri, 13 Aug 1999, Mark McCleary wrote:
>> Do omni_threads have any facility to handle thread specific data?

> No.

However, there is nothing to stop one add thread specific data via the
native thread API. For instance, if you know your native thread is pthread,
you can use pthread primitives to add thread specific data.

The reason why omnithread do not have facilities to add thread specific
data is that such mechanism is not guaranteed to work on all platforms. The
main problem is when a thread exits, the thread runtime does not always
clean up the thread specific data automatically. Pthread have this ability
but win32 does not.

Notice that one can add this facility to omnithread if we make the
assumption that all threads are created by the omnithread library. At the
moment, we don't impose this restriction. 

Sai-Lai


-- 
Sai-Lai Lo                                   S.Lo@uk.research.att.com
AT&T Laboratories Cambridge           WWW:   http://www.uk.research.att.com 
24a Trumpington Street                Tel:   +44 1223 343000
Cambridge CB2 1QA                     Fax:   +44 1223 313542
ENGLAND