Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
actor-incubator
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
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-incubator
Commits
4f554f17
Commit
4f554f17
authored
Feb 20, 2019
by
Hauke Goldhammer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix caf::bb::container_source
parent
555b27a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
libcaf_bb/caf/bb/container_source.hpp
libcaf_bb/caf/bb/container_source.hpp
+13
-13
No files found.
libcaf_bb/caf/bb/container_source.hpp
View file @
4f554f17
...
...
@@ -45,7 +45,7 @@ struct container_source_state {
// -- properties -------------------------------------------------------------
size_t
remaining
()
const
{
size_t
remaining
()
{
return
static_cast
<
size_t
>
(
std
::
distance
(
i
,
xs
.
end
()));
}
...
...
@@ -80,21 +80,21 @@ behavior container_source(container_source_type<Container>* self, Container xs,
// Spin up stream manager and connect the first sink.
self
->
state
.
init
(
std
::
move
(
xs
));
auto
src
=
self
->
make_source
(
std
::
move
(
sink
),
[
&
](
unit_t
&
)
{
// nop
},
[
self
](
unit_t
&
,
downstream
<
value_type
>&
out
,
size_t
hint
)
{
auto
&
st
=
self
->
state
;
auto
n
=
std
::
min
(
hint
,
st
.
remaining
());
for
(
size_t
pushed
=
0
;
pushed
<
n
;
++
pushed
)
out
.
push
(
std
::
move
(
*
st
.
i
++
));
},
[
self
](
const
unit_t
&
)
{
return
self
->
state
.
at_end
();
});
std
::
move
(
sink
),
[
&
](
unit_t
&
)
{
// nop
},
[
self
](
unit_t
&
,
downstream
<
value_type
>&
out
,
size_t
hint
)
{
auto
&
st
=
self
->
state
;
auto
n
=
std
::
min
(
hint
,
st
.
remaining
());
for
(
size_t
pushed
=
0
;
pushed
<
n
;
++
pushed
)
out
.
push
(
std
::
move
(
*
st
.
i
++
));
},
[
self
](
const
unit_t
&
)
{
return
self
->
state
.
at_end
();
});
// Add the remaining sinks.
std
::
initializer_list
<
unit_t
>
{
src
.
ptr
()
->
add_outbound_path
(
sinks
)...};
return
{};
}
;
}
/// Convenience function for spawning container sources.
...
...
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