Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F69663164
Synchronizer.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Jul 2, 21:56
Size
766 B
Mime Type
text/x-c
Expires
Thu, Jul 4, 21:56 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
18739176
Attached To
R6622 liboncilla
Synchronizer.cpp
View Options
#include "Synchronizer.h"
#include <stdexcept>
using namespace std;
namespace rci {
namespace oncilla {
Synchronizer::Synchronizer(const std::string &sname)
: ::rci::Synchronizer(sname)
, d_inProcess(false){
}
Synchronizer::~Synchronizer() {
}
bool Synchronizer::start(){
d_inProcess = false;
return rci::Synchronizer::start();
}
void Synchronizer::processAsync(){
if(!tooBusy()){
start();
}
if(d_inProcess){
throw std::logic_error("Previous processing is not terminated.");
} else {
d_inProcess = true;
}
ProcessAsyncPrimpl();
}
void Synchronizer::waitForProcessAsync(){
if(!tooBusy()){
start();
}
if(!d_inProcess){
//just do nothing, since nothing to do;
return;
}
WaitForProcessAsyncPrimpl();
d_inProcess = false;
}
}
}
Event Timeline
Log In to Comment