sc::ThreadGrp(3)

πŸ“¦
version 2.3.1 Β· 5 versions
, in ubuntu jammy

πŸ’… sc::ThreadGrp(3) β€” MPQC manual page, bestie πŸ’…

Okay so this is the MPQC manual page for sc::ThreadGrp(3). It’s giving abstract base class energy, and it manages separate threads of control. No cap. 🧡✨

✨ NAME ✨

sc::ThreadGrp β€” The ThreadGrp abstract class provides a means to manage separate threads of control. πŸ’–

🌸 SYNOPSIS 🌸

#include <thread.h>

Inherits sc::DescribedClass.

Inherited by sc::ProcThreadGrp, sc::PthreadThreadGrp, and sc::PumaThreadGrp.

πŸ’– Public Member Functions

  • ThreadGrp (const Ref< KeyVal > &) β€” constructor from a KeyVal reference. The page gives the signature and doesn’t add extra description. πŸŽ€
  • ThreadGrp (const ThreadGrp &, int nthread=-1) β€” another constructor, with nthread defaulting to -1. Again, no extra behavior is described here. πŸ¦‹
  • virtual void add_thread (int threadnum, Thread *thread) β€” assigns a Thread object to each thread. If 0 is assigned to a thread, that thread will be skipped. ✨
  • virtual void add_thread (int threadnum, Thread *thread, int priority) β€” like add_thread(threadnum, thread), but you also assign a priority that the thread is to use. Heads up: this member is primarily for experimentation, and the priority argument is currently not well defined and ignored. πŸ’€
  • int nthread () const β€” the number of threads that will be run by start_threads. πŸ”₯
  • void delete_threads () β€” listed with no extra description, bestie. That’s the whole line. 🫢
  • virtual int start_threads ()=0 β€” starts the threads running. Pure virtual. πŸ‘‘
  • virtual int wait_threads ()=0 β€” waits for all the threads to complete. Pure virtual. 🌈
  • virtual Ref< ThreadLock > new_lock ()=0 β€” return a local object. Pure virtual. πŸŽ€
  • virtual ThreadGrp * clone (int nthread=-1) β€” create a ThreadGrp like the current one, with nthread defaulting to -1. 🧚

🌟 Static Public Member Functions

  • static void set_default_threadgrp (const Ref< ThreadGrp > &) β€” static function, listed with this exact signature. ✨
  • static ThreadGrp * get_default_threadgrp () β€” static function, listed with this exact signature. ⭐
  • static ThreadGrp * initial_threadgrp (int &argc, char **argv) β€” static function, listed with this exact signature. πŸ¦‹
The page doesn’t give extra descriptions under these static functions, so I’m not inventing lore. πŸ’…

πŸ”’ Protected Attributes

  • Thread ** threads_ β€” protected attribute, spelled exactly like this. 🧡
  • int nthread_ β€” protected attribute, spelled exactly like this. πŸ”’

🧚 Additional Inherited Members 🧚

This heading is here, but the page doesn’t list any extra inherited members under it. That’s the tea. 🍡

πŸ’œ Detailed Description πŸ’œ

The ThreadGrp abstract class provides a means to manage separate threads of control. It’s the base-class blueprint for wrangling separate threads, and that’s the whole vibe. 🧡✨

🫢 Member Function Documentation 🫢

virtual void sc::ThreadGrp::add_thread (int threadnum, Thread * thread) β€” [virtual]

Assigns a Thread object to each thread. If 0 is assigned to a thread, then that thread will be skipped. πŸ’–

Reimplemented in sc::PthreadThreadGrp.

Referenced by sc::PthreadThreadGrp::add_thread().

virtual void sc::ThreadGrp::add_thread (int threadnum, Thread * thread, int priority) β€” [virtual]

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. πŸ’€

Reimplemented in sc::PthreadThreadGrp.

virtual ThreadGrp* sc::ThreadGrp::clone (int nthread = -1) β€” [virtual]

Create 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 in sc::ProcThreadGrp, and sc::PthreadThreadGrp.

virtual int sc::ThreadGrp::start_threads () β€” [pure virtual]

Starts the threads running. Thread 0 will be run by the thread that calls start_threads. πŸ‘‘

Implemented in sc::ProcThreadGrp, sc::PthreadThreadGrp, and sc::PumaThreadGrp.

virtual int sc::ThreadGrp::wait_threads () β€” [pure virtual]

Wait for all the threads to complete. This must be called before start_threads is called again or the object is destroyed. 😭

Implemented in sc::ProcThreadGrp, sc::PthreadThreadGrp, and sc::PumaThreadGrp.

πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for MPQC from the source code. πŸ’…


And that’s the whole page, bestie! πŸ’– The footer/source vibe says Version 2.3.1, Sun Oct 4 2020, and the page is sc::ThreadGrp(3) from MPQC. Stay iconic. 🧡✨

πŸ“¦ where this page comes from