Class epicsThread

Nested Relationships

Nested Types

Class Documentation

class epicsThread

An OS thread.

A wrapper around the epicsThread* C API.

Note

Threads must be start() ed.

Public Functions

epicsThread(epicsThreadRunable&, const char *name, unsigned int stackSize, unsigned int priority = epicsThreadPriorityLow)

Create a new thread with the provided information.

cf. epicsThreadOpts

Note

Threads must be start() ed.

Throws

epicsThread::unableToCreateThread – on error.

~epicsThread()
void start()

Actually start the thread.

void exitWait()

Wait for the thread epicsRunnable::run() to return.

bool exitWait(const double delay)

Wait for the thread epicsRunnable::run() to return.

Parameters

delay – Wait up to this many seconds.

Returns

true if run() returned. false on timeout.

void resume()

cf. epicsThreadResume()

void getName(char *name, size_t size) const

cf. epicsThreadGetName();

epicsThreadId getId() const

cf. epicsThreadGetIdSelf()()

unsigned int getPriority() const

cf. epicsThreadGetPriority()

void setPriority(unsigned int)

cf. epicsThreadSetPriority()

bool priorityIsEqual(const epicsThread&) const
bool isSuspended() const
bool isCurrentThread() const
Returns

true if call through this thread’s epicsRunnable::run()

bool operator==(const epicsThread&) const
void show(unsigned level) const

Say something interesting about this thread to stdout.

Public Static Functions

static void exit()

Note

This exitException doesn’t not derive from std::exception

Throws

A – special exitException which will be caught and ignored.

static void suspendSelf()
static void sleep(double seconds)
static const char *getNameSelf()
static bool isOkToBlock()
static void setOkToBlock(bool isOkToBlock)