PVData C++ 8.0.9
Loading...
Searching...
No Matches
epics::pvData::Thread::Config Class Reference

Create a new thread using the given. More...

#include <misc/pv/thread.h>

Public Member Functions

 Config (Runnable *r)
 Config (void(*fn)(void *), void *ptr)
template<typename C>
 Config (C *inst, void(C::*meth)())
Config & name (const std::string &n)
Config & prio (unsigned int p)
Config & stack (epicsThreadStackSizeClass s)
Config & autostart (bool a)
Config & run (Runnable *r)
 Thread will execute Runnable::run().
Config & run (void(*fn)(void *), void *ptr)
 Thread will execute (*fn)(ptr).
template<typename C>
Config & run (C *inst, void(C::*meth)())
 Thread will execute (inst->*meth)().
template<typename T>
Config & operator<< (T x)
 Append to thread name string. Argument must be understood by std::ostream::operator<<.

Friends

class Thread

Detailed Description

Create a new thread using the given.

be reused.

Defaults: name: "" priority: epicsThreadPriorityLow (aka epics::pvData::lowestPriority) stack size: epicsThreadStackSmall auto start: true runner: nil (must be set explictly)

stuct bar { void meth(); ... } X;
// with a static thread name
Thread foo(Thread::Config(&X, &bar::meth)
.name("example")
.prio(epicsThreadPriorityHigh));
// with a constructed thread name
Thread foo(Thread::Config(&X, &bar::meth)
.prio(epicsThreadPriorityHigh)
<<"example"<<1);
Create a new thread using the given.
Definition thread.h:96
Exceptions
std::logic_errorfor improper

runner)

Definition at line 95 of file thread.h.

Constructor & Destructor Documentation

◆ Config()

template<typename C>
epics::pvData::Thread::Config::Config ( C * inst,
void(C::* meth )() )
inline

Definition at line 112 of file thread.h.

Member Function Documentation

◆ operator<<()

template<typename T>
Config & epics::pvData::Thread::Config::operator<< ( T x)
inline

Append to thread name string. Argument must be understood by std::ostream::operator<<.

Definition at line 140 of file thread.h.

◆ run()

template<typename C>
Config & epics::pvData::Thread::Config::run ( C * inst,
void(C::* meth )() )
inline

Thread will execute (inst->*meth)().

Definition at line 128 of file thread.h.

◆ Thread

friend class Thread
friend

Definition at line 103 of file thread.h.


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