Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
4b4b782d
Commit
4b4b782d
authored
Dec 06, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print nothing if no user events occur
parent
a89e0b38
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
libcaf_core/src/logger.cpp
libcaf_core/src/logger.cpp
+9
-1
No files found.
libcaf_core/src/logger.cpp
View file @
4b4b782d
...
@@ -547,16 +547,24 @@ string_view logger::skip_path(string_view path) {
...
@@ -547,16 +547,24 @@ string_view logger::skip_path(string_view path) {
}
}
void
logger
::
run
()
{
void
logger
::
run
()
{
// Bail out without printing anything if the first event we receive is the
// shutdown (empty) event.
queue_
.
wait_nonempty
();
if
(
queue_
.
front
().
message
.
empty
())
return
;
log_first_line
();
log_first_line
();
// Loop until receiving an empty message.
for
(;;)
{
for
(;;)
{
queue_
.
wait_nonempty
();
// Handle current head of the queue.
auto
&
e
=
queue_
.
front
();
auto
&
e
=
queue_
.
front
();
if
(
e
.
message
.
empty
())
{
if
(
e
.
message
.
empty
())
{
log_last_line
();
log_last_line
();
return
;
return
;
}
}
handle_event
(
e
);
handle_event
(
e
);
// Prepare next iteration.
queue_
.
pop_front
();
queue_
.
pop_front
();
queue_
.
wait_nonempty
();
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment