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
566b6642
Commit
566b6642
authored
Oct 30, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport downstream manager fix from 0.18
parent
a0f4966e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
libcaf_core/caf/broadcast_downstream_manager.hpp
libcaf_core/caf/broadcast_downstream_manager.hpp
+10
-0
libcaf_core/caf/fused_downstream_manager.hpp
libcaf_core/caf/fused_downstream_manager.hpp
+10
-0
No files found.
libcaf_core/caf/broadcast_downstream_manager.hpp
View file @
566b6642
...
@@ -65,6 +65,16 @@ public:
...
@@ -65,6 +65,16 @@ public:
// -- properties -------------------------------------------------------------
// -- properties -------------------------------------------------------------
template
<
class
...
Ts
>
bool
push_to
(
stream_slot
slot
,
Ts
&&
...
xs
)
{
auto
i
=
states
().
find
(
slot
);
if
(
i
!=
states
().
end
())
{
i
->
second
.
buf
.
emplace_back
(
std
::
forward
<
Ts
>
(
xs
)...);
return
true
;
}
return
false
;
}
size_t
buffered
()
const
noexcept
override
{
size_t
buffered
()
const
noexcept
override
{
// We have a central buffer, but also an additional buffer at each path. We
// We have a central buffer, but also an additional buffer at each path. We
// return the maximum size to reflect the current worst case.
// return the maximum size to reflect the current worst case.
...
...
libcaf_core/caf/fused_downstream_manager.hpp
View file @
566b6642
...
@@ -256,6 +256,16 @@ public:
...
@@ -256,6 +256,16 @@ public:
return
result
;
return
result
;
}
}
size_t
buffered
(
stream_slot
slot
)
const
noexcept
override
{
// We don't know which nested manager stores this path. Only one will give a
// valid answer, though. Everyone else always responds with 0. Hence, we can
// simply call all managers and sum up the results.
size_t
result
=
0
;
for
(
auto
ptr
:
ptrs_
)
result
+=
ptr
->
buffered
(
slot
);
return
result
;
}
void
clear_paths
()
override
{
void
clear_paths
()
override
{
CAF_LOG_TRACE
(
""
);
CAF_LOG_TRACE
(
""
);
for
(
auto
ptr
:
ptrs_
)
for
(
auto
ptr
:
ptrs_
)
...
...
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