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
8ab92007
Commit
8ab92007
authored
Jun 12, 2019
by
Dominik Charousset
Committed by
Dominik Charousset
Jun 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup BASP instance when broker shuts down
parent
b78cb1a3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
libcaf_io/caf/io/basp_broker.hpp
libcaf_io/caf/io/basp_broker.hpp
+3
-1
libcaf_io/src/basp_broker.cpp
libcaf_io/src/basp_broker.cpp
+4
-1
No files found.
libcaf_io/caf/io/basp_broker.hpp
View file @
8ab92007
...
@@ -130,7 +130,9 @@ public:
...
@@ -130,7 +130,9 @@ public:
// -- member variables -------------------------------------------------------
// -- member variables -------------------------------------------------------
/// Protocol instance of BASP.
/// Protocol instance of BASP.
union
{
basp
::
instance
instance
;
basp
::
instance
instance
;
};
/// Keeps context information for all open connections.
/// Keeps context information for all open connections.
ctx_map
ctx
;
ctx_map
ctx
;
...
...
libcaf_io/src/basp_broker.cpp
View file @
8ab92007
...
@@ -61,9 +61,9 @@ basp_broker::basp_broker(actor_config& cfg)
...
@@ -61,9 +61,9 @@ basp_broker::basp_broker(actor_config& cfg)
:
super
(
cfg
),
:
super
(
cfg
),
basp
::
instance
::
callee
(
super
::
system
(),
basp
::
instance
::
callee
(
super
::
system
(),
static_cast
<
proxy_registry
::
backend
&>
(
*
this
)),
static_cast
<
proxy_registry
::
backend
&>
(
*
this
)),
instance
(
this
,
*
this
),
this_context
(
nullptr
)
{
this_context
(
nullptr
)
{
CAF_ASSERT
(
this_node
()
!=
none
);
CAF_ASSERT
(
this_node
()
!=
none
);
new
(
&
instance
)
basp
::
instance
(
this
,
*
this
);
}
}
basp_broker
::~
basp_broker
()
{
basp_broker
::~
basp_broker
()
{
...
@@ -83,7 +83,10 @@ void basp_broker::on_exit() {
...
@@ -83,7 +83,10 @@ void basp_broker::on_exit() {
// Make sure all spawn servers are down before clearing the container.
// Make sure all spawn servers are down before clearing the container.
for
(
auto
&
kvp
:
spawn_servers
)
for
(
auto
&
kvp
:
spawn_servers
)
anon_send_exit
(
kvp
.
second
,
exit_reason
::
kill
);
anon_send_exit
(
kvp
.
second
,
exit_reason
::
kill
);
// Clear remaining state.
spawn_servers
.
clear
();
spawn_servers
.
clear
();
monitored_actors
.
clear
();
instance
.
~
instance
();
}
}
const
char
*
basp_broker
::
name
()
const
{
const
char
*
basp_broker
::
name
()
const
{
...
...
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