|
AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface
|
| drama::thread::KickNotifier::KickNotifier | ( | TAction * | action | ) |
KickNotifier constructor.
Constructs a KickNotifier object, used to allow blocking action code to be notified if a Kick is received by the action. This must be executed from a threaded action or a child thread of such an action.
User code should ensure an object of this type or a sub-class is constructed before the blocking code, and destroyed after it is finished.
The constructor will create a thread that will wait for notification from DRAMA that the action has been kicked.
When a kick occurs, the Kicked() method with will be invoked. A sub-class code can override the Kicked() method to do something appropriate to cause the blocked code to unblock.
Alternatively, user code can invoke the WasKicked() method to determine if a kick has occurred.
| action | The threaded action we are implementing. Note, if this is a null pointer, KickNotifier does nothing. |