NAME
ACE_TSS -
Allows objects that are "physically" in thread specific
storage (i.e., private to a thread) to be accessed as though
they were "logically" global to a program.
SYNOPSIS
#include <ace/Synch_T.h>
template<class TYPE>
class ACE_TSS
{
public:
ACE_TSS (TYPE *ts_obj = 0);
~ACE_TSS (void);
TYPE *ts_object (void) const;
TYPE *ts_object (TYPE *);
TYPE *operator-> () const;
operator TYPE *(void) const;
virtual TYPE *make_TSS_TYPE (void) const;
void dump (void) const;
protected:
TYPE *ts_get (void) const;
TYPE type_;
ACE_Mutex keylock_;
int once_;
ACE_thread_key_t key_;
static void cleanup (void *ptr);
inline void operator= (const ACE_TSS<TYPE> &);
inline ACE_TSS (const ACE_TSS<TYPE> &);
};
DESCRIPTION
This class is a wrapper around the OS thread library
thread-specific functions. It uses the C++ operator-() to
shield applications from the details of accessing
thread-specific storage.
Disallow copying...
inline void operator= (const ACE_TSS<TYPE> &);
inline ACE_TSS (const ACE_TSS<TYPE> &);
AUTHOR
Doug Schmidt
LIBRARY
ace