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
608879a9
Commit
608879a9
authored
Sep 14, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log individual module shutdown
parent
710eccb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
7 deletions
+30
-7
libcaf_core/caf/actor_system.hpp
libcaf_core/caf/actor_system.hpp
+8
-4
libcaf_core/src/actor_system.cpp
libcaf_core/src/actor_system.cpp
+22
-3
No files found.
libcaf_core/caf/actor_system.hpp
View file @
608879a9
...
...
@@ -19,13 +19,14 @@
#pragma once
#include <array>
#include <mutex>
#include <atomic>
#include <string>
#include <memory>
#include <condition_variable>
#include <cstddef>
#include <functional>
#include <condition_variable>
#include <memory>
#include <mutex>
#include <string>
#include <typeinfo>
#include "caf/abstract_actor.hpp"
#include "caf/actor_cast.hpp"
...
...
@@ -164,6 +165,9 @@ public:
virtual
~
module
();
/// Returns the human-redable name of the module.
const
char
*
name
()
const
noexcept
;
/// Starts any background threads needed by the module.
virtual
void
start
()
=
0
;
...
...
libcaf_core/src/actor_system.cpp
View file @
608879a9
...
...
@@ -203,6 +203,21 @@ actor_system::module::~module() {
// nop
}
const
char
*
actor_system
::
module
::
name
()
const
noexcept
{
switch
(
id
())
{
case
scheduler
:
return
"Scheduler"
;
case
middleman
:
return
"Middleman"
;
case
opencl_manager
:
return
"OpenCL Manager"
;
case
openssl_manager
:
return
"OpenSSL Manager"
;
default:
return
"???"
;
}
}
actor_system
::
actor_system
(
actor_system_config
&
cfg
)
:
ids_
(
0
),
types_
(
*
this
),
...
...
@@ -310,9 +325,13 @@ actor_system::~actor_system() {
// group module is the first one, relies on MM
groups_
.
stop
();
// stop modules in reverse order
for
(
auto
i
=
modules_
.
rbegin
();
i
!=
modules_
.
rend
();
++
i
)
if
(
*
i
)
(
*
i
)
->
stop
();
for
(
auto
i
=
modules_
.
rbegin
();
i
!=
modules_
.
rend
();
++
i
)
{
auto
&
ptr
=
*
i
;
if
(
ptr
!=
nullptr
)
{
CAF_LOG_DEBUG
(
"stop module"
<<
ptr
->
name
());
ptr
->
stop
();
}
}
await_detached_threads
();
registry_
.
stop
();
}
...
...
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