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
48f0a29a
Commit
48f0a29a
authored
Feb 09, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add stream_scatterer::terminal member function
parent
b924e148
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
0 deletions
+16
-0
libcaf_core/caf/stream_scatterer.hpp
libcaf_core/caf/stream_scatterer.hpp
+6
-0
libcaf_core/caf/terminal_stream_scatterer.hpp
libcaf_core/caf/terminal_stream_scatterer.hpp
+2
-0
libcaf_core/src/stream_scatterer.cpp
libcaf_core/src/stream_scatterer.cpp
+4
-0
libcaf_core/src/terminal_stream_scatterer.cpp
libcaf_core/src/terminal_stream_scatterer.cpp
+4
-0
No files found.
libcaf_core/caf/stream_scatterer.hpp
View file @
48f0a29a
...
...
@@ -122,6 +122,12 @@ public:
return
self_
;
}
// -- meta information -------------------------------------------------------
/// Returns `true` if thie scatterer belongs to a sink, i.e., terminates the
/// stream and never has outbound paths.
virtual
bool
terminal
()
const
noexcept
;
// -- pure virtual memeber functions -----------------------------------------
/// Sends batches to sinks.
...
...
libcaf_core/caf/terminal_stream_scatterer.hpp
View file @
48f0a29a
...
...
@@ -34,6 +34,8 @@ public:
~
terminal_stream_scatterer
()
override
;
size_t
capacity
()
const
noexcept
override
;
bool
terminal
()
const
noexcept
override
;
};
}
// namespace caf
...
...
libcaf_core/src/stream_scatterer.cpp
View file @
48f0a29a
...
...
@@ -160,6 +160,10 @@ size_t stream_scatterer::total_credit() const noexcept {
return
fold
(
std
::
plus
<
size_t
>
{},
size_t
{
0u
},
paths_
);
}
bool
stream_scatterer
::
terminal
()
const
noexcept
{
return
false
;
}
void
stream_scatterer
::
about_to_erase
(
map_type
::
iterator
i
,
bool
silent
,
error
*
reason
)
{
if
(
!
silent
)
{
...
...
libcaf_core/src/terminal_stream_scatterer.cpp
View file @
48f0a29a
...
...
@@ -35,4 +35,8 @@ size_t terminal_stream_scatterer::capacity() const noexcept {
return
std
::
numeric_limits
<
size_t
>::
max
();
}
bool
terminal_stream_scatterer
::
terminal
()
const
noexcept
{
return
true
;
}
}
// namespace caf
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