ost::Event(3)

πŸ“¦ version 1.8.1, in ubuntu jammy

πŸ’– ost::Event β€” Library Functions Manual πŸ’–

okay bestie, pull up a chair, because we're talking about ost::Event from the ost C++ library (that's the GNU CommonC++ situation, you know the one) 🌸 this whole page is filed under section 3, the library functions manual, and it is genuinely iconic.


✨ NAME ✨

ost::Event β€” the Event class, which implements a feature originally found in the WIN32 API. it's event notification, babe. that's the whole vibe πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

#include <thread.h>

🌈 Public Member Functions 🌈

  • Event()
  • virtual ~Event()
  • void reset(void) β€” once it's been signaled, the Event class has to be 'reset' before it'll respond to a new signal.
  • void signal(void) β€” signal the event for the waiting thread.
  • bool wait(timeout_t timer) β€” wait either for the event to be signaled by another thread, or for the specified timeout duration.
  • bool wait(void)

πŸ‘‘ Detailed Description πŸ‘‘

so here's the tea β˜• the Event class implements a feature that originally lived in the WIN32 API β€” event notification, periodt.

a target thread waits on a resetable Event, and then one or more other threads can signal the waiting thread so it resumes execution. main character energy, honestly πŸ’…

a timeout can be used to specify a wait duration in milliseconds. and listen β€” the Event class must be reset before it can be used again as a trigger, no cap. these event objects use a trigger/reset mechanism and they're related to low level conditional variables. iykyk 🧚

Author

  • : David Sugar dyfet@ostel.com

Thread synchornization on event notification.


πŸ’œ Constructor & Destructor Documentation πŸ’œ

🫢 ost::Event::Event()

🫢 virtual ost::Event::~Event() [virtual]


⭐ Member Function Documentation ⭐

πŸ“ void ost::Event::reset(void)

once it's been signaled, the Event class must be 'reset' before it'll respond to a new signal. like, it literally will not hear you until you do. πŸ’€

See also

  • signal

πŸ“ void ost::Event::signal(void)

signal the event for the waiting thread. that's it, that's the function, go wake her up bestie πŸ”₯


πŸ“ bool ost::Event::wait(timeout_t timer)

wait either for the event to be signaled by another thread, or for the specified timeout duration. whichever comes first, girlie 🌸

See also

  • signal

Returns

  • true if signaled, false if timed out.

Parameters

  • timer β€” timeout in milliseconds to wait for a signal.

πŸ“ bool ost::Event::wait(void)

(that's the no-argument overload, the ✨mysterious✨ one β€” the manpage lists it and honestly? it's giving minimalist queen 🌈)


🌟 Author 🌟

generated automatically by Doxygen for GNU CommonC++ from the source code. not a human, a whole robot, and it ate πŸ’…


okay that's the whole page, you're so welcome πŸ’– and just so you have the receipts: this is from GNU CommonC++, dated Sun Dec 27 2020, and it's the ost::Event(3) page. go forth and synchronize those threads, bestie, you got this πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from