CS::Threading Namespace Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Classes | Typedefs | Enumerations
CS::Threading Namespace Reference

Functions and classes for threading, locking and atomic operations. More...

## Classes
class | AtomicOperationsBase
| Define low-level atomic operations. More...
class | Barrier
| Barrier synchronization class. More...
class | Condition
| Condition variable. More...
class | MutexImpl
| General mutex class. More...
class | OptionalMutex
| Helper that is a (non-recursive) mutex if _Lock is `true` or does nothing if _Lock is `false`. More...
class | ReadWriteMutex
| A mutex class which provides concurrent reads and exclusive writes. More...
class | Runnable
| Abstract base class for objects acting as executor in separate threads. More...
class | ScopedLock
| This is a utility class for locking a Mutex. More...
class | Thread
| Object representing a separate execution thread. More...
class | ThreadGroup
| A group of threads handled as one unit. More...
class | ThreadLocal
| Thread local storage of arbitrary C++ objects. More...
class | ThreadLocalBase
| Thread local storage of a pointer value (void*). More...
## Typedefs
typedef MutexImpl < Implementation::MutexBase > | Mutex
| Basic non-recursive mutex.
typedef MutexImpl < Implementation::RecursiveMutexBase > | RecursiveMutex
| Basic recursive mutex.
typedef uintptr_t | ThreadID
| OS specific thread identifier.
## Enumerations
enum | ThreadPriority { THREAD_PRIO_LOW = 0, THREAD_PRIO_NORMAL = 1, THREAD_PRIO_HIGH = 2 }
| Priority values indicate how frequently a thread runs compared to other threads. More...

## Detailed Description

Functions and classes for threading, locking and atomic operations.

## Typedef Documentation

typedef MutexImpl<Implementation::MutexBase> CS::Threading::Mutex

Basic non-recursive mutex.

Definition at line 110 of file mutex.h.

typedef MutexImpl<Implementation::RecursiveMutexBase> CS::Threading::RecursiveMutex

Basic recursive mutex.

The difference between a normal mutex and recursive mutex is that a recursive mutex won't lock if same thread try to enter it several times.

Definition at line 117 of file mutex.h.

typedef uintptr_t CS::Threading::ThreadID

OS specific thread identifier.

Definition at line 78 of file thread.h.

## Enumeration Type Documentation

enum CS::Threading::ThreadPriority

Priority values indicate how frequently a thread runs compared to other threads.

Thread scheduling is handled by the underlying OS, and so the true meaning of these values will vary depending on platform. A minimal set of values is defined for CS so that chances of support of the full range of values by the platform are greater.

Enumerator:

  THREAD_PRIO_LOW | Reduced thread priority. Useful for background tasks.
  THREAD_PRIO_NORMAL | Normal thread priority.
  THREAD_PRIO_HIGH | Increased thread priority. Useful for tasks that needs precedence over all other.

Definition at line 38 of file thread.h.