Supplying RWThreadAttribute Instances At Construction
RWThreadAttribute instances can be supplied to threaded runnable objects if the runnables are constructed using the appropriate static make() functions. If a thread attribute instance is not specified when a threaded runnable is constructed, then that runnable is initialized with its own RWThreadAttribute instance initialized with default values.
The following list identifies the make() functions for each threaded runnable class that accepts an RWThreadAttribute instance:
static RWRunnableServer make(const RWThreadAttribute&)— Constructs an RWRunnableServer instance initialized with the specified thread attribute instance.
static RWServerPool make(const RWThreadAttribute&,size_t) — Constructs an RWServerPool instance whose main thread is created using the specified thread attribute instance and whose pool threads are created using default thread attributes.
static RWServerPool make(size_t,const RWThreadAttribute&)— Constructs an RWServerPool instance whose main thread is created with default thread attributes and whose pool threads are created using the specified thread attribute instance.
static RWServerPool make(const RWThreadAttribute&
serverThreadAttr, size_t numThreads,
const RWThreadAttribute& poolThreadsAttr,
size_t maxCapacity);
Constructs an RWServerPool instance whose main thread is created using the first thread attribute instance and whose pool threads are created using the second thread attribute instance.
static RWThreadFunction make(RWTFunctor<void()>&, const RWThreadAttribute&)— Constructs an RWThreadFunction instance initialized with the specified thread attribute instance.
static RWThreadFunction make(const RWThreadAttribute&)— Constructs an RWThreadFunction instance initialized with the specified thread attribute instance.
static RWTThreadIOUFunction<R> make(const RWTFunctor<R()>&, const RWThreadAttribute&)— Constructs an RWTThreadIOUFunction instance initialized with the specified thread attribute instance.
static RWTThreadIOUFunction<R> make (const RWTIOUEscrow <R>&, const RWTFunctor<R()>&, const RWThreadAttribute&)— Constructs an RWTThreadIOUFunction instance initialized with the specified thread attribute instance.