Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ThreadKey Class Reference

This class implements the thread key (per-thread unique thread-specific container). More...

#include <threadkey.h>

Collaboration diagram for ThreadKey:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ThreadKey ()
 Set up thread key.

 ~ThreadKey ()
 Destroy a thread key.

void * get ()
 Get the current "value" pointer of the thread key:.

void set (void *v)
 Set a new value for the thread key:.


Private Attributes

GStaticPrivate k

Detailed Description

This class implements the thread key (per-thread unique thread-specific container).

Author:
Wolfgang Wieser ] wwieser (a) gmx <*> de [
ThreadKey represents a thread private data key. Threads can thereby obtain and set a pointer, which is private to the current thread.

Note:
The number of thread keys is normally quite limited.

Definition at line 47 of file threadkey.h.


Constructor & Destructor Documentation

ThreadKey::ThreadKey  )  [inline]
 

Set up thread key.

Definition at line 63 of file threadkey.h.

References k, and USE_PRIVATE__PTHREADS.

ThreadKey::~ThreadKey  )  [inline]
 

Destroy a thread key.

Definition at line 71 of file threadkey.h.

References k, and USE_PRIVATE__PTHREADS.


Member Function Documentation

void* ThreadKey::get  )  [inline]
 

Get the current "value" pointer of the thread key:.

Definition at line 79 of file threadkey.h.

References k, and USE_PRIVATE__PTHREADS.

void ThreadKey::set void *  v  )  [inline]
 

Set a new value for the thread key:.

Definition at line 87 of file threadkey.h.

References k, and USE_PRIVATE__PTHREADS.


Member Data Documentation

GStaticPrivate ThreadKey::k [private]
 

Definition at line 58 of file threadkey.h.

Referenced by get(), set(), ThreadKey(), and ~ThreadKey().


The documentation for this class was generated from the following file:
Generated on Sat Feb 19 22:35:45 2005 for Ray by doxygen 1.3.5