AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface

◆ WaitForEvent()

void drama::thread::TAction::WaitForEvent ( EntryCode event,
sds::IdPtr *const  arg = nullptr 
)
inlineinherited

Block the current thread until a kick/signal message for the action is received.

Note - in an action with multiple subsidiary threads, any number of the threads can block waiting for a kick/signal. They will all be woken up when the event occurs.

Parameters
eventThe entry reason. EntryCode::Kick or EntryCode::Signal
argThe argument to the kick/signal, if any. An address of and sds::IdPtr is supplied. If you supply a null pointer, it is ignored. Otherwise, any argument to the kick is copied into here. If there is no argument to the kick, it will refer to a null SDS item.

References drama::CreateRunDramaTask(), and D2LOG_DRAMA2.