ARC SDK
|
The Processor performs pre- and post-transfer operations. More...
#include <arc/data-staging/Processor.h>
Public Member Functions | |
Processor () | |
Constructor. | |
~Processor () | |
Destructor waits for all active threads to stop. | |
void | start (void) |
Start Processor. More... | |
void | stop (void) |
Stop Processor. More... | |
virtual void | receiveDTR (DTR_ptr dtr) |
Send a DTR to the Processor. More... | |
![]() | |
virtual | ~DTRCallback () |
Empty virtual destructor. | |
The Processor performs pre- and post-transfer operations.
The Processor takes care of everything that should happen before and after a transfer takes place. Calling receiveDTR() spawns a thread to perform the required operation depending on the DTR state.
|
virtual |
The DTR is sent to the Processor through this method when some long-latency processing is to be performed, eg contacting a remote service. The Processor spawns a thread to do the processing, and then returns. The thread pushes the DTR back to the scheduler when it is finished.
Implements DataStaging::DTRCallback.
void DataStaging::Processor::start | ( | void | ) |
Start Processor.
This method actually does nothing. It is here only to make all classes of data staging to look alike. But it is better to call it before starting to use object because it may do something in the future.
void DataStaging::Processor::stop | ( | void | ) |
Stop Processor.
This method sends waits for all started threads to end and exits. Since threads are short-lived it is better to wait rather than interrupt them.