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
ce389e8b
Commit
ce389e8b
authored
Jun 30, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add make_continuous_source
parent
f3c8d96c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
libcaf_core/caf/scheduled_actor.hpp
libcaf_core/caf/scheduled_actor.hpp
+30
-0
No files found.
libcaf_core/caf/scheduled_actor.hpp
View file @
ce389e8b
...
...
@@ -505,6 +505,36 @@ public:
std
::
move
(
pull
),
std
::
move
(
done
),
std
::
move
(
fin
),
token
);
}
/// Creates a new continuous stream source by instantiating the default
/// source implementation with `Driver. `The returned manager is not
/// connected to any slot and thus not stored by the actor automatically.
template
<
class
Driver
,
class
Init
,
class
Pull
,
class
Done
,
class
Finalize
=
unit_t
>
typename
Driver
::
source_ptr_type
make_continuous_source
(
Init
init
,
Pull
pull
,
Done
done
,
Finalize
fin
=
{})
{
using
detail
::
make_stream_source
;
auto
mgr
=
make_stream_source
<
Driver
>
(
this
,
std
::
move
(
init
),
std
::
move
(
pull
),
std
::
move
(
done
),
std
::
move
(
fin
));
mgr
->
continuous
(
true
);
return
mgr
;
}
/// Creates a new continuous stream source by instantiating the default
/// source implementation with `Driver. `The returned manager is not
/// connected to any slot and thus not stored by the actor automatically.
template
<
class
Init
,
class
Pull
,
class
Done
,
class
Finalize
=
unit_t
,
class
DownstreamManager
=
broadcast_downstream_manager
<
typename
stream_source_trait_t
<
Pull
>
::
output
>>
stream_source_ptr
<
DownstreamManager
>
make_continuous_source
(
Init
init
,
Pull
pull
,
Done
done
,
Finalize
fin
=
{},
policy
::
arg
<
DownstreamManager
>
=
{})
{
using
driver
=
detail
::
stream_source_driver_impl
<
DownstreamManager
,
Pull
,
Done
,
Finalize
>
;
return
make_continuous_source
<
driver
>
(
std
::
move
(
init
),
std
::
move
(
pull
),
std
::
move
(
done
),
std
::
move
(
fin
));
}
template
<
class
Driver
,
class
...
Ts
>
make_sink_result
<
typename
Driver
::
input_type
>
make_sink
(
const
stream
<
typename
Driver
::
input_type
>&
src
,
Ts
&&
...
xs
)
{
...
...
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