SSP21-CPP
Public Member Functions | List of all members
exe4cpp::IExecutor Class Referenceabstract

#include <exe4cpp/IExecutor.h>

Public Member Functions

virtual Timer start (const duration_t &duration, const action_t &action)=0
 
virtual Timer start (const steady_time_t &expiration, const action_t &action)=0
 
virtual void post (const action_t &action)=0
 
- Public Member Functions inherited from exe4cpp::ISteadyTimeSource
virtual steady_time_t get_time ()=0
 

Detailed Description

Interface that abstracts an event loop.

Events can be posted for to execute immediately or some time in the future. Events are processed in the order they are posted.

Definition at line 44 of file IExecutor.h.

Member Function Documentation

◆ start() [1/2]

virtual Timer exe4cpp::IExecutor::start ( const duration_t &  duration,
const action_t &  action 
)
pure virtual
Returns
start a new timer based on a relative time duration

Implemented in exe4cpp::MockExecutor, exe4cpp::StrandExecutor, and exe4cpp::BasicExecutor.

◆ start() [2/2]

virtual Timer exe4cpp::IExecutor::start ( const steady_time_t &  expiration,
const action_t &  action 
)
pure virtual
Returns
start a new timer based on an absolute timestamp of the steady clock

Implemented in exe4cpp::MockExecutor, exe4cpp::StrandExecutor, and exe4cpp::BasicExecutor.

◆ post()

virtual void exe4cpp::IExecutor::post ( const action_t &  action)
pure virtual
Returns
Thread-safe way to post an event to be handled asynchronously

Implemented in exe4cpp::StrandExecutor, exe4cpp::MockExecutor, and exe4cpp::BasicExecutor.