ost::Runlist(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– 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 limit
  • unsigned 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

  • true if 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