Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F64055548
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, May 24, 06:35
Size
766 B
Mime Type
text/x-c
Expires
Sun, May 26, 06:35 (2 d)
Engine
blob
Format
Raw Data
Handle
17849843
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