Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F85135400
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
Fri, Sep 27, 00:42
Size
766 B
Mime Type
text/x-c
Expires
Sun, Sep 29, 00:42 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
21127644
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