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
ef5181c4
Commit
ef5181c4
authored
May 13, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add scheduled_actor::make_stream_id
parent
3b10a63d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
libcaf_core/caf/scheduled_actor.hpp
libcaf_core/caf/scheduled_actor.hpp
+7
-4
No files found.
libcaf_core/caf/scheduled_actor.hpp
View file @
ef5181c4
...
@@ -312,6 +312,11 @@ public:
...
@@ -312,6 +312,11 @@ public:
/// Owning poiner to an `upstream_policy`.
/// Owning poiner to an `upstream_policy`.
using
upstream_policy_ptr
=
std
::
unique_ptr
<
upstream_policy
>
;
using
upstream_policy_ptr
=
std
::
unique_ptr
<
upstream_policy
>
;
/// Returns a new stream ID.
stream_id
make_stream_id
()
{
return
{
ctrl
(),
new_request_id
(
message_priority
::
normal
).
integer_value
()};
}
// Starts a new stream.
// Starts a new stream.
template
<
class
Handle
,
class
...
Ts
,
class
Init
,
class
Getter
,
template
<
class
Handle
,
class
...
Ts
,
class
Init
,
class
Getter
,
class
ClosedPredicate
,
class
ResHandler
>
class
ClosedPredicate
,
class
ResHandler
>
...
@@ -339,8 +344,7 @@ public:
...
@@ -339,8 +344,7 @@ public:
return
{
stream_id
{
nullptr
,
0
},
nullptr
};
return
{
stream_id
{
nullptr
,
0
},
nullptr
};
}
}
// generate new stream ID
// generate new stream ID
stream_id
sid
{
ctrl
(),
auto
sid
=
make_stream_id
();
new_request_id
(
message_priority
::
normal
).
integer_value
()};
stream
<
type
>
token
{
sid
};
stream
<
type
>
token
{
sid
};
auto
ys
=
std
::
tuple_cat
(
std
::
forward_as_tuple
(
token
),
std
::
move
(
xs
));
auto
ys
=
std
::
tuple_cat
(
std
::
forward_as_tuple
(
token
),
std
::
move
(
xs
));
// generate new ID for the final response message and send handshake
// generate new ID for the final response message and send handshake
...
@@ -410,8 +414,7 @@ public:
...
@@ -410,8 +414,7 @@ public:
rp
.
deliver
(
sec
::
no_downstream_stages_defined
);
rp
.
deliver
(
sec
::
no_downstream_stages_defined
);
return
{
stream_id
{
nullptr
,
0
},
nullptr
};
return
{
stream_id
{
nullptr
,
0
},
nullptr
};
}
}
stream_id
sid
{
ctrl
(),
auto
sid
=
make_stream_id
();
new_request_id
(
message_priority
::
normal
).
integer_value
()};
auto
next
=
stages
.
back
();
auto
next
=
stages
.
back
();
CAF_ASSERT
(
next
!=
nullptr
);
CAF_ASSERT
(
next
!=
nullptr
);
fwd_stream_handshake
<
type
>
(
sid
,
xs
);
fwd_stream_handshake
<
type
>
(
sid
,
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