Apache log4cxx Version @version@

Public Member Functions | List of all members
ThreadLocal Class Reference

This class provides thread-local variables. More...

`#include <threadlocal.h>`

## Public Member Functions
| ThreadLocal ()
| Create new instance. More...
| ~ThreadLocal ()
| Destructor. More...
void | set (void *priv)
| Sets the value in the current thread's copy of this thread-local variable. More...
void * | get ()
| Returns the value in the current thread's copy of this thread-local variable. More...

## Detailed Description

This class provides thread-local variables.

This class is similar in function to java.lang.ThreadLocal.

## Constructor & Destructor Documentation

## ◆ ThreadLocal()

ThreadLocal | ( |  | ) |

Create new instance.

## ◆ ~ThreadLocal()

~ThreadLocal | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ get()

void * get | ( |  | ) |

Returns the value in the current thread's copy of this thread-local variable.

Returns
  value of thread-local variable for the current thread.

## ◆ set()

void set | ( | void * | priv | ) |

Sets the value in the current thread's copy of this thread-local variable.

Parameters

  priv | new value.

The documentation for this class was generated from the following file:

- threadlocal.h