Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120683350
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
Sun, Jul 6, 06:54
Size
766 B
Mime Type
text/x-c
Expires
Tue, Jul 8, 06:54 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27229065
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