RSC  0.16.0
rsc::threading::TaskExecutor Class Referenceabstract

Interface for different scheduling strategies for Task instances. More...

#include <TaskExecutor.h>

Inheritance diagram for rsc::threading::TaskExecutor:
Inheritance graph
Collaboration diagram for rsc::threading::TaskExecutor:
Collaboration graph

Public Member Functions

virtual void schedule (TaskPtr t)=0
 Schedules the new task. More...
 
virtual void schedule (TaskPtr t, const boost::uint64_t &delayMus)=0
 Schedules a new task to be executed after the specified delay. More...
 

Detailed Description

Interface for different scheduling strategies for Task instances.

Implementations must not schedule the task if it is already canceled when being scheduled.

Implementations must execute the task even if it is canceled before within the time of the specified delay.

Author
swrede
jwienke

Definition at line 50 of file TaskExecutor.h.

Member Function Documentation

virtual void rsc::threading::TaskExecutor::schedule ( TaskPtr  t)
pure virtual

Schedules the new task.

Parameters
tthe new task to schedule
Exceptions
std::invalid_argumenttask to schedule is already canceled

Implemented in rsc::threading::ThreadedTaskExecutor.

virtual void rsc::threading::TaskExecutor::schedule ( TaskPtr  t,
const boost::uint64_t &  delayMus 
)
pure virtual

Schedules a new task to be executed after the specified delay.

Parameters
tnew task to schedule
delayMusthe delay after which the task should start
Exceptions
rsc::misc::UnsupportedOperationExceptionimplementations may throw this exception to indicate that a scheduling of tasks with a specified delay is not supported
std::invalid_argumenttask to schedule is already canceled

Implemented in rsc::threading::ThreadedTaskExecutor.


The documentation for this class was generated from the following file: