Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: tnlThread.h File Reference

# tnlThread.h File Reference

`#include "tnl.h"`
`#include "tnlNetBase.h"`
`#include "tnlMethodDispatch.h"`
`#include <pthread.h>`
`#include <semaphore.h>`

## Namespaces

namespace | TNL

## Data Structures

class | TNL::Semaphore
| Platform independent semaphore class. More...
class | TNL::Mutex
| Platform independent Mutual Exclusion implementation. More...
class | TNL::Thread
| Platform independent Thread class. More...
class | TNL::ThreadStorage
| Platform independent per-thread storage class. More...
class | TNL::ThreadQueue
| Managing object for a queue of worker threads that pass messages back and forth to the main thread. More...
class | TNL::ThreadQueue::ThreadQueueThread

## Defines

#define | TNL_DECLARE_THREADQ_METHOD(func, args)
| Declares a ThreadQueue method on a subclass of ThreadQueue.
#define | TNL_IMPLEMENT_THREADQ_METHOD(className, func, args, argNames)
| Declares the implementation of a ThreadQueue method.

## Define Documentation

#define TNL_DECLARE_THREADQ_METHOD | ( | func,
|  | args |  | ) |

Value:

    void func args; \
       void func##_body args

Declares a ThreadQueue method on a subclass of ThreadQueue.

#define TNL_IMPLEMENT_THREADQ_METHOD | ( | className,
|  | func,
|  | args,
|  | argNames |  | ) |

Value:

    void className::func args { \
       FunctorDecl<void (className::*)args> *theCall = new FunctorDecl<void (className::*)args>(&className::func##_body); \
       theCall->set argNames; \
       postCall(theCall); \
       }\
       void className::func##_body args

Declares the implementation of a ThreadQueue method.