Skip to content

ACutoffSignal#

One-shot event communication.

Header:#include <AUI/Thread/ACutoffSignal.h>
CMake:aui_link(my_target PUBLIC aui::core)

Detailed Description#

Used for guaranteed signal from slave thread to master thread (i.e. wait till slave thread starts).

Public Methods#

makeSignal#


void ACutoffSignal::makeSignal()

Flags a signal, causing the waitForSignal() to never block.

resetSignal#


void ACutoffSignal::resetSignal()

Resets the cut off state so the waitForSignal() function would block again.

waitForSignal#


void ACutoffSignal::waitForSignal()

Wait for makeSignal().

waitForSignal() blocks the thread until makeSignal() is not called by other thread.

Unlike condition variable, the second call to makeSignal() will not block. To override this behaviour, use the resetSignal() function.