.TH "sc::PthreadThreadGrp" 3 "Sun Oct 4 2020" "Version 2.3.1" "MPQC" \" -*- nroff -*- .ad l .nh .SH NAME sc::PthreadThreadGrp \- The \fBPthreadThreadGrp\fP class privides a concrete thread group appropriate for an environment where pthreads is available\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBsc::ThreadGrp\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBPthreadThreadGrp\fP (const \fBPthreadThreadGrp\fP &, int \fBnthread\fP=\-1)" .br .ti -1c .RI "\fBPthreadThreadGrp\fP (const \fBRef\fP< \fBKeyVal\fP > &)" .br .ti -1c .RI "int \fBstart_threads\fP ()" .br .RI "Starts the threads running\&. " .ti -1c .RI "int \fBwait_threads\fP ()" .br .RI "Wait for all the threads to complete\&. " .ti -1c .RI "void \fBadd_thread\fP (int i, \fBThread\fP *t)" .br .RI "Assigns a \fBThread\fP object to each thread\&. " .ti -1c .RI "void \fBadd_thread\fP (int i, \fBThread\fP *t, int priority)" .br .RI "Like add_thread(threadnum, thread), but assign a priority that the thread is to use\&. " .ti -1c .RI "\fBRef\fP< \fBThreadLock\fP > \fBnew_lock\fP ()" .br .RI "Return a local object\&. " .ti -1c .RI "\fBThreadGrp\fP * \fBclone\fP (int \fBnthread\fP=\-1)" .br .RI "Create a \fBThreadGrp\fP like the current one\&. " .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBPthreadThreadGrp\fP class privides a concrete thread group appropriate for an environment where pthreads is available\&. .SH "Member Function Documentation" .PP .SS "void sc::PthreadThreadGrp::add_thread (int threadnum, \fBThread\fP * thread)\fC [inline]\fP, \fC [virtual]\fP" .PP Assigns a \fBThread\fP object to each thread\&. If 0 is assigned to a thread, then that thread will be skipped\&. .PP Reimplemented from \fBsc::ThreadGrp\fP\&. .PP References sc::ThreadGrp::add_thread()\&. .SS "void sc::PthreadThreadGrp::add_thread (int threadnum, \fBThread\fP * thread, int priority)\fC [virtual]\fP" .PP Like add_thread(threadnum, thread), but assign a priority that the thread is to use\&. The member is primarily for experimentation, the priority argument is currently not well defined and ignored\&. .br .PP Reimplemented from \fBsc::ThreadGrp\fP\&. .SS "\fBThreadGrp\fP* sc::PthreadThreadGrp::clone (int nthread = \fC\-1\fP)\fC [virtual]\fP" .PP Create a \fBThreadGrp\fP like the current one\&. If nthread is given, the new \fBThreadGrp\fP will attempt to support that number of threads, but the actual number supported may be less\&. If nthread is -1, the number of threads in the current group will be used\&. .PP Reimplemented from \fBsc::ThreadGrp\fP\&. .SS "int sc::PthreadThreadGrp::start_threads ()\fC [virtual]\fP" .PP Starts the threads running\&. \fBThread\fP 0 will be run by the thread that calls start_threads\&. .PP Implements \fBsc::ThreadGrp\fP\&. .SS "int sc::PthreadThreadGrp::wait_threads ()\fC [virtual]\fP" .PP Wait for all the threads to complete\&. This must be called before start_threads is called again or the object is destroyed\&. .PP Implements \fBsc::ThreadGrp\fP\&. .SH "Author" .PP Generated automatically by Doxygen for MPQC from the source code\&.