TD struct
Context 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
TDwill capture the epoch stack size and pushep_. - void finish()
- During finish
TDwill pop all epochs off of the stack down to the size it captured instart() - void suspend()
- When suspended,
TDwill 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,
TDwill 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 |