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
0f8b1e4a
Commit
0f8b1e4a
authored
Nov 19, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Abort stream when receiving exit_reason::kill
parent
e9398439
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
libcaf_core/src/scheduled_actor.cpp
libcaf_core/src/scheduled_actor.cpp
+16
-3
No files found.
libcaf_core/src/scheduled_actor.cpp
View file @
0f8b1e4a
...
...
@@ -583,11 +583,24 @@ scheduled_actor::categorize(mailbox_element& x) {
auto
em
=
content
.
move_if_unshared
<
exit_msg
>
(
0
);
// make sure to get rid of attachables if they're no longer needed
unlink_from
(
em
.
source
);
// exit_reason::kill is always fatal
if
(
em
.
reason
==
exit_reason
::
kill
)
// exit_reason::kill is always fatal
and also aborts streams.
if
(
em
.
reason
==
exit_reason
::
kill
)
{
quit
(
std
::
move
(
em
.
reason
));
else
std
::
vector
<
stream_manager_ptr
>
xs
;
for
(
auto
&
kvp
:
stream_managers_
)
xs
.
emplace_back
(
kvp
.
second
);
for
(
auto
&
kvp
:
pending_stream_managers_
)
xs
.
emplace_back
(
kvp
.
second
);
std
::
sort
(
xs
.
begin
(),
xs
.
end
());
auto
last
=
std
::
unique
(
xs
.
begin
(),
xs
.
end
());
std
::
for_each
(
xs
.
begin
(),
last
,
[
&
](
stream_manager_ptr
&
mgr
)
{
mgr
->
stop
(
exit_reason
::
kill
);
});
stream_managers_
.
clear
();
pending_stream_managers_
.
clear
();
}
else
{
call_handler
(
exit_handler_
,
this
,
em
);
}
return
message_category
::
internal
;
}
case
make_type_token
<
down_msg
>
():
{
...
...
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