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
d5f028e2
Commit
d5f028e2
authored
Jan 18, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1019
parents
cff96757
31db8929
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
libcaf_core/src/scheduled_actor.cpp
libcaf_core/src/scheduled_actor.cpp
+15
-0
No files found.
libcaf_core/src/scheduled_actor.cpp
View file @
d5f028e2
...
@@ -842,6 +842,21 @@ bool scheduled_actor::finalize() {
...
@@ -842,6 +842,21 @@ bool scheduled_actor::finalize() {
// Repeated calls always return `true` but have no side effects.
// Repeated calls always return `true` but have no side effects.
if
(
getf
(
is_cleaned_up_flag
))
if
(
getf
(
is_cleaned_up_flag
))
return
true
;
return
true
;
// TODO: This is a workaround for issue #1011. Iterating over all stream
// managers here and dropping them as needed prevents the
// never-terminating part, but it still means that "dead" stream manager
// can accumulate over time since we only run this O(n) path if the
// actor is shutting down.
if
(
!
has_behavior
()
&&
!
stream_managers_
.
empty
())
{
for
(
auto
i
=
stream_managers_
.
begin
();
i
!=
stream_managers_
.
end
();)
{
if
(
i
->
second
->
done
())
i
=
stream_managers_
.
erase
(
i
);
else
++
i
;
if
(
stream_managers_
.
empty
())
stream_ticks_
.
stop
();
}
}
// An actor is considered alive as long as it has a behavior and didn't set
// An actor is considered alive as long as it has a behavior and didn't set
// the terminated flag.
// the terminated flag.
if
(
alive
())
if
(
alive
())
...
...
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