sc::PthreadThreadGrp(3)
Hey bestie π welcome to the MPQC manual page for sc::PthreadThreadGrp(3). We're about to get into some pthread thread group lore, and yes, it's giving serious "I know my way around a build system" energy. β¨
πΈ NAME πΈ
sc::PthreadThreadGrp β the PthreadThreadGrp class privides (yes, that's the exact spelling in the original, no cap π) a concrete thread group that's appropriate for an environment where pthreads is available. π
β¨ SYNOPSIS β¨
#include <thpthd.h>
Inherits sc::ThreadGrp.
π Inherits
sc::ThreadGrp.
π Public Member Functions
PthreadThreadGrp (const PthreadThreadGrp &, int nthread=-1)β constructor with aconst PthreadThreadGrp &and anint nthreadthat defaults to-1.PthreadThreadGrp (const Ref< KeyVal > &)β constructor with aconst Ref< KeyVal > &.int start_threads ()β starts the threads running.int wait_threads ()β waits for all the threads to complete.void add_thread (int i, Thread *t)β assigns aThreadobject to each thread.void add_thread (int i, Thread *t, int priority)β likeadd_thread(threadnum, thread), but assigns a priority that the thread is to use.Ref< ThreadLock > new_lock ()β returns a local object.ThreadGrp * clone (int nthread=-1)β creates aThreadGrplike the current one.
π«Ά Additional Inherited Members
This section is literally just a heading in the original β no extra member list is shown here. The inherited stuff is already above, iykyk. π¦
π¦ Detailed Description π¦
The PthreadThreadGrp class privides (again, original spelling π) a concrete thread group that's appropriate for an environment where pthreads is available. That's the whole vibe here. β¨
π Member Function Documentation π
π add_thread (int threadnum, Thread * thread)
void sc::PthreadThreadGrp::add_thread (int threadnum, Thread * thread)
[inline], [virtual] β this one assigns a Thread object to each thread. If 0 is assigned to a thread, then that thread will be skipped. π
Reimplemented from sc::ThreadGrp.
References sc::ThreadGrp::add_thread().
π add_thread (int threadnum, Thread * thread, int priority)
void sc::PthreadThreadGrp::add_thread (int threadnum, Thread * thread, int priority)
[virtual] β like add_thread(threadnum, thread), but assigns a priority that the thread is to use. The member is primarily for experimentation, and the priority argument is currently not well defined and ignored. So yeah, experimental vibe only. π
Reimplemented from sc::ThreadGrp.
β¨ clone (int nthread = -1)
ThreadGrp* sc::PthreadThreadGrp::clone (int nthread = -1)
[virtual] β creates a ThreadGrp like the current one. If nthread is given, the new ThreadGrp 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. π«Ά
Reimplemented from sc::ThreadGrp.
π₯ start_threads ()
int sc::PthreadThreadGrp::start_threads ()
[virtual] β starts the threads running. Thread 0 will be run by the thread that calls start_threads. π
Implements sc::ThreadGrp.
π wait_threads ()
int sc::PthreadThreadGrp::wait_threads ()
[virtual] β waits for all the threads to complete. This must be called before start_threads is called again or the object is destroyed. Fr fr, don't skip this step. π
Implements sc::ThreadGrp.
β Author β
Doxygen auto-generated this for MPQC straight from the source code.
π That's the page, bestie β Version 2.3.1, dated Sun Oct 4 2020, and it's the sc::PthreadThreadGrp(3) page. Bye! π
π¦ where this page comes from
- ubuntu jammy: libsc-doc 2.3.1-21
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms