RSC  0.16.0
rsc::threading::ThreadedTaskExecutor Class Reference

A very simple TaskExecutor that uses a new thread for each incomming task. More...

#include <ThreadedTaskExecutor.h>

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

Public Member Functions

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

Static Private Member Functions

static void executeTask (TaskPtr task, const boost::uint64_t &delayMus)
 

Detailed Description

A very simple TaskExecutor that uses a new thread for each incomming task.

Author
jwienke
swrede

Definition at line 40 of file ThreadedTaskExecutor.h.

Constructor & Destructor Documentation

rsc::threading::ThreadedTaskExecutor::ThreadedTaskExecutor ( )

Definition at line 36 of file ThreadedTaskExecutor.cpp.

rsc::threading::ThreadedTaskExecutor::~ThreadedTaskExecutor ( )
virtual

Definition at line 39 of file ThreadedTaskExecutor.cpp.

Member Function Documentation

void rsc::threading::ThreadedTaskExecutor::executeTask ( TaskPtr  task,
const boost::uint64_t &  delayMus 
)
staticprivate

Definition at line 58 of file ThreadedTaskExecutor.cpp.

void rsc::threading::ThreadedTaskExecutor::schedule ( TaskPtr  t)
virtual

Schedules the new task.

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

Implements rsc::threading::TaskExecutor.

Definition at line 42 of file ThreadedTaskExecutor.cpp.

void rsc::threading::ThreadedTaskExecutor::schedule ( TaskPtr  t,
const boost::uint64_t &  delayMus 
)
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

Implements rsc::threading::TaskExecutor.

Definition at line 46 of file ThreadedTaskExecutor.cpp.


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