Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
scdaq
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scouting-demonstrator
scdaq
Commits
379e9ab7
Commit
379e9ab7
authored
6 months ago
by
Giovanna Lazzari Miotto
Browse files
Options
Downloads
Patches
Plain Diff
tidy: Make members private, clean up
parent
5255e952
No related branches found
No related tags found
No related merge requests found
Pipeline
#8301570
passed
6 months ago
Stage: check
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/multi_pipeline.cc
+5
-5
5 additions, 5 deletions
src/multi_pipeline.cc
src/multi_pipeline.h
+12
-12
12 additions, 12 deletions
src/multi_pipeline.h
with
17 additions
and
17 deletions
src/multi_pipeline.cc
+
5
−
5
View file @
379e9ab7
...
...
@@ -105,7 +105,7 @@ void MultiPipeline::MonitorRun() {
throw
(
std
::
runtime_error
(
"Invalid control state:
\n
"
+
control_
.
Print
()));
}
control_
.
cv_
.
notify_all
();
cv
_
.
notify_one
();
run_condition
_
.
notify_one
();
}
}
}
...
...
@@ -125,17 +125,17 @@ int MultiPipeline::Run() {
while
(
true
)
{
{
std
::
unique_lock
lock
(
cv_mutex_
);
cv_
.
wait
(
lock
,
[
&
]
{
return
ready_to_run_
||
control_
.
flag_teardown_
;
});
run_condition_
.
wait
(
lock
,
[
&
]
{
return
ready_to_run_
||
control_
.
flag_teardown_
;
});
LOG
(
TRACE
)
<<
"Action triggered: run="
<<
ready_to_run_
<<
", teardown="
<<
control_
.
flag_teardown_
;
ready_to_run_
=
false
;
}
LOG
(
TRACE
)
<<
"Action triggered: run="
<<
ready_to_run_
<<
", teardown="
<<
control_
.
flag_teardown_
;
if
(
control_
.
flag_teardown_
)
{
break
;
}
cv
_
.
notify_all
();
run_condition
_
.
notify_all
();
try
{
RunPipelines
(
static_cast
<
unsigned
int
>
(
pipelines_
.
size
()));
...
...
This diff is collapsed.
Click to expand it.
src/multi_pipeline.h
+
12
−
12
View file @
379e9ab7
...
...
@@ -19,8 +19,8 @@ class MultiPipeline {
public:
explicit
MultiPipeline
(
Config
c
);
~
MultiPipeline
();
void
MonitorRun
();
int
Run
();
void
MonitorRun
();
void
ReportRun
();
std
::
ostringstream
ReportAllPipelineMetrics
();
std
::
ostringstream
ReportEndOfRun
(
double
duration_ns
,
bool
commit_to_file
);
...
...
@@ -28,25 +28,25 @@ class MultiPipeline {
static
ctrl
control_
;
const
Config
conf_
;
std
::
deque
<
Pipeline
>
pipelines_
;
std
::
deque
<
std
::
unique_ptr
<
PipelineMonitor
>>
pipeline_monitors_
;
tbb
::
task_scheduler_init
scheduler_init_
;
boost
::
asio
::
io_service
io_service_
;
boost
::
thread
server_thread_
;
std
::
unique_ptr
<
server
>
server_
;
bool
ready_to_run_
=
false
;
bool
is_reporting_
=
false
;
bool
shutdown_
=
false
;
std
::
condition_variable
cv_
;
private:
void
MakePipelines
();
int
RunPipelines
(
uint
num_streams
);
std
::
deque
<
std
::
unique_ptr
<
PipelineMonitor
>>
pipeline_monitors_
;
std
::
mutex
cv_mutex_
;
std
::
condition_variable
run_condition_
;
std
::
thread
run_control_thread_
;
std
::
thread
reporter_thread_
;
boost
::
asio
::
io_service
io_service_
;
boost
::
thread
server_thread_
;
std
::
unique_ptr
<
server
>
server_
;
tbb
::
task_scheduler_init
scheduler_init_
;
bool
ready_to_run_
=
false
;
bool
is_reporting_
=
false
;
bool
shutdown_
=
false
;
};
#endif // SCDAQ_MULTI_PIPELINE_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment