ost::Event(3)
π 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
trueif signaled,falseif 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
- 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