ost::Runlist(3)
π NAME π
ost::Runlist β bestie, it's a runlist π and what it does is restrict concurrent exection to a limited set of concurrent sessions, much like a semaphore. Yes "exection" is in the original, no I'm not fixing it, it's iconic π
This page lives in the Library Functions Manual, section 3, iykyk π¦
β¨ SYNOPSIS β¨
#include <misc.h>
Inherits ost::Mutex. Yep, it's got that inheritance going on, main character lineage fr π
π Public Member Functions π
Runlist(unsigned count=1)β create a new runlist with a specified limit β¨bool add(Runable *run)β add a runable object to this runlist π«Άvoid del(Runable *run)β remove a runable object from the wait list or notify when it is done running so that the used count can be decremented πvoid set(unsigned limit)β set the limit π₯
πΈ Protected Member Functions πΈ
void check(void)
π Protected Attributes π
unsigned limitunsigned used
β Additional Inherited Members β
(yeah that's it, that's the whole section, no cap)
π Detailed Description π
A runlist is used to restrict concurrent exection to a limited set of concurrent sessions, much like a semaphore. π§
However β and this is the plot twist, bestie β the runlist differs in that it notifies objects when they become ready to run, rather than requiring them to wait and 'block' for the semaphore count to become low enough to continue. It's giving "hey girlie you're up π" instead of "get in line and wait." Not me being obsessed with this design honestly π
Author
David Sugar dyfet@ostel.com
list of runable objects.
(that last line is literally just chilling there in the original, so it stays π«Ά)
π Constructor & Destructor Documentation π
ost::Runlist::Runlist (unsigned count = 1)
Create a new runlist with a specified limit. Baby's first runlist, slay β¨
Parameters
countβ limit before wait queuing.
π Member Function Documentation π
bool ost::Runlist::add (Runable * run)
Add a runable object to this runlist. If the number of entries running is below the limit, then add returns true otherwise the entry is added to the list. Lowkey a vibe check for your runables π
Returns
trueif immediately ready to run
Parameters
runβ pointer to runable object.
void ost::Runlist::check (void) [protected]
(no description given, it's mysterious like that π)
void ost::Runlist::del (Runable * run)
Remove a runable object from the wait list or notify when it is done running so that the used count can be decremented. It's the goodbye-and-make-room energy fr fr π¦
Parameters
runβ pointer to runable object.
void ost::Runlist::set (unsigned limit)
Set the limit. Periodt π
Parameters
limitβ to use.
πΈ Member Data Documentation πΈ
unsigned ost::Runlist::limit [protected]
unsigned ost::Runlist::used [protected]
β Author β
Generated automatically by Doxygen for GNU CommonC++ from the source code. π€β¨
okay that's the whole page bestie, go forth and runlist responsibly π«Ά
This one came from GNU CommonC++, dated Sun Dec 27 2020, and it's page ost::Runlist(3) β mwah, no notes ππ
π¦ where this page comes from
- ubuntu jammy: libcommoncpp2-doc 1.8.1-10
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms