Main Page Namespace List Class Hierarchy Compound List Compound Members

# ZThread::InheritableThreadLocal Class Template Reference

`#include <InheritableThreadLocal.h>`

Inheritance diagram for ZThread::InheritableThreadLocal::

List of all members.

## Public Methods
| InheritableThreadLocal () throw ()
virtual | ~InheritableThreadLocal () throw ()
## Protected Methods
virtual void* | childValue (void *parentValue) throw ()
virtual bool | propogateValue () throw ()

## Detailed Description

### template<class T> class ZThread::InheritableThreadLocal

Author:
  Eric Crahen

Version:
  1.4.1

Date:
  04-28-2001

This object acts exactly like its super class ThreadLocal with one subtle difference. That difference is that parent threads values can atomatically be propogated to child threads when they are created (eg run() has been invoked). This is done through the initialize method.

## Constructor & Destructor Documentation

InheritableThreadLocal ( | ) throw ()`[inline]`

| Create a new InheritableThreadLocal object

~InheritableThreadLocal ( | ) throw ()`[inline, virtual]`

| Destroy this InheritableThreadLocal object

## Member Function Documentation

void * childValue ( | void * parentValue ) throw ()`[inline, protected, virtual]`

  | This method will be invoked by the framework when a child thread is created, if its parent has set a value for this key. This is invoked from the childs context, and will be passed the parents value. Parameters:
  void | * parentValue - parents value for this variable
  Returns: void* value to set for this thread Precondition: The parent must have set a value for this to be invoked. Otherwise it will not be called and the client can expect the initialValue() method to be invoked as it would in the ThreadLocal class Postcondition: if this function has been called by the framework, initialValue() will not be called Parameters:
  parentValue |
Reimplemented from ZThread::AbstractThreadLocal.

bool propogateValue ( | ) throw ()`[inline, protected, virtual]`

| Inform the framework this value does propogate to child threads Returns: true - always Reimplemented from ZThread::ThreadLocal.

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

- InheritableThreadLocal.h