Open Lighting Architecture: ola::thread Namespace Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
ola::thread Namespace Reference

## Detailed Description

Threads and synchronization mechanisms.

## Classes
class | CallbackThread
| A thread which executes a Callback. More...
class | ConsumerThread
class | ExecutorInterface
| Defer execution of a callback. More...
class | ExecutorThread
| Enables callbacks to be executed in a separate thread. More...
class | Future
class | Future< void >
class | FutureImpl
class | FutureImpl< void >
class | Mutex
class | MutexLocker
class | ConditionVariable
class | PeriodicThread
| A thread which executes a Callback. More...
class | SchedulerInterface
| Allows Callbacks to be scheduled to run after a specified interval. More...
class | SchedulingExecutorInterface
| Combines the ExecutorInterface and the SchedulerInterface. More...
class | SignalThread
class | Thread
class | ThreadPool
class | SelectServer
| A single threaded I/O event management system. More...
class | string
| STL class. More...

## Typedefs
typedef void * | timeout_id
| A timeout handle which can later be used to cancel a timeout.
typedef pthread_t | ThreadId

## Functions
std::string | PolicyToString (int policy)
| Convert a scheduling policy to a string.
bool | SetSchedParam (pthread_t thread, int policy, const struct sched_param &param)
| Wraps pthread_setschedparam().

## Variables
static const timeout_id | INVALID_TIMEOUT = NULL
| An invalid / uninitialized timeout_id.

## Function Documentation

## ◆ PolicyToString()

std::string ola::thread::PolicyToString | ( | int | policy | ) |

Convert a scheduling policy to a string.

Parameters

  policy | the scheduling policy.

Returns
  The name of the policy or "unknown".

## ◆ SetSchedParam()

bool ola::thread::SetSchedParam | ( | pthread_t | thread,
|  | int | policy,
|  | const struct sched_param & | param )

Wraps pthread_setschedparam().

Parameters

  thread | The thread id.
  policy | the new policy.
  param | the scheduling parameters.

Returns
  True if the call succeeded, false otherwise.