struct
TDContext for termination detection to be preserved with a task. Manages the epoch stack associated with running tasks. Produces and consumes in the constructor and destructor to ensure termination is not detected early.
Constructors, destructors, conversion operators
Public functions
- void start()
- During start
TD
will capture the epoch stack size and pushep_
. - void finish()
- During finish
TD
will pop all epochs off of the stack down to the size it captured instart()
- void suspend()
- When suspended,
TD
will preserve any epochs pushed on the stack after begin and restore the stack back to the state before begin was invoked. - void resume()
- When resumed,
TD
will restore the stack back from when it was suspended.
Function documentation
template<typename MsgPtrT>
vt:: ctx:: TD:: TD(MsgPtrT const& msg) explicit
Construct with a message to extract the epoch; produce on that epoch.
Parameters | |
---|---|
msg in | the message to extract the epoch from |