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
3627cdb7
Commit
3627cdb7
authored
Aug 25, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix exception handling in actor_registry::stop
parent
ee447203
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
libcaf_core/src/actor_registry.cpp
libcaf_core/src/actor_registry.cpp
+14
-8
No files found.
libcaf_core/src/actor_registry.cpp
View file @
3627cdb7
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include "caf/spawn.hpp"
#include "caf/spawn.hpp"
#include "caf/locks.hpp"
#include "caf/locks.hpp"
#include "caf/exception.hpp"
#include "caf/actor_cast.hpp"
#include "caf/actor_cast.hpp"
#include "caf/attachable.hpp"
#include "caf/attachable.hpp"
#include "caf/exit_reason.hpp"
#include "caf/exit_reason.hpp"
...
@@ -166,14 +167,19 @@ void actor_registry::dispose() {
...
@@ -166,14 +167,19 @@ void actor_registry::dispose() {
void
actor_registry
::
stop
()
{
void
actor_registry
::
stop
()
{
scoped_actor
self
{
true
};
scoped_actor
self
{
true
};
for
(
auto
&
kvp
:
named_entries_
)
{
try
{
self
->
monitor
(
kvp
.
second
);
for
(
auto
&
kvp
:
named_entries_
)
{
self
->
send_exit
(
kvp
.
second
,
exit_reason
::
kill
);
self
->
monitor
(
kvp
.
second
);
self
->
receive
(
self
->
send_exit
(
kvp
.
second
,
exit_reason
::
kill
);
[](
const
down_msg
&
)
{
self
->
receive
(
// nop
[](
const
down_msg
&
)
{
}
// nop
);
}
);
}
}
catch
(
actor_exited
&
)
{
CAF_LOG_ERROR
(
"actor_exited thrown in actor_registry::stop"
);
}
}
named_entries_
.
clear
();
named_entries_
.
clear
();
}
}
...
...
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