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

◆ WaitForEventTimeoutIn() [2/2]

bool drama::thread::TAction::WaitForEventTimeoutIn ( EntryCode event,
unsigned  seconds,
sds::IdPtr *const  arg = 0 
)
inlineinherited

Block the current thread until a signal/kick for the action is received or a duration in seconds has passed.

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

Parameters
eventThe entry reason. EntryCode::Kick or EntryCode::Signal. If a timeout occurs, will by EntryCode::DramaAbortWaits.
secondsThe maximum time span during which the thread will block waiting to be notified. duration is in seconds.
argThe argument to the kick, 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, this is not written to.
Returns
Returns true if the kick was received, false for a timeout.

References drama::CreateRunDramaTask().