28#ifndef _util_group_thpthd_h
29#define _util_group_thpthd_h
36#include <util/group/thread.h>
42class PthreadThreadGrp:
public ThreadGrp {
45 pthread_attr_t *attr_;
48 void init_priority(
int,
int);
51 PthreadThreadGrp(
const PthreadThreadGrp&,
int nthread = -1);
void add_thread(int i, Thread *t, int priority)
Like add_thread(threadnum, thread), but assign a priority that the thread is to use.
void add_thread(int i, Thread *t)
Assigns a Thread object to each thread.
Definition thpthd.h:57
ThreadGrp * clone(int nthread=-1)
Create a ThreadGrp like the current one.
Ref< ThreadLock > new_lock()
Return a local object.
int start_threads()
Starts the threads running.
int wait_threads()
Wait for all the threads to complete.
A template class that maintains references counts.
Definition ref.h:332
int nthread() const
The number of threads that will be run by start_thread.
Definition thread.h:111
virtual void add_thread(int threadnum, Thread *thread)
Assigns a Thread object to each thread.
The Thread abstract class defines an interface which must be implemented by classes wishing to be run...
Definition thread.h:79