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
dea2b3f0
Commit
dea2b3f0
authored
Oct 07, 2022
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cache handling when skipping messages
parent
4ca826a6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
libcaf_core/src/scheduled_actor.cpp
libcaf_core/src/scheduled_actor.cpp
+10
-2
No files found.
libcaf_core/src/scheduled_actor.cpp
View file @
dea2b3f0
...
@@ -306,8 +306,16 @@ resumable::resume_result scheduled_actor::resume(execution_unit* ctx,
...
@@ -306,8 +306,16 @@ resumable::resume_result scheduled_actor::resume(execution_unit* ctx,
// TODO: maybe replace '3' with configurable / adaptive value?
// TODO: maybe replace '3' with configurable / adaptive value?
static
constexpr
size_t
quantum
=
3
;
static
constexpr
size_t
quantum
=
3
;
// Dispatch urgent and normal (asynchronous) messages.
// Dispatch urgent and normal (asynchronous) messages.
get_urgent_queue
().
new_round
(
quantum
*
3
,
handle_async
);
auto
&
hq
=
get_urgent_queue
();
get_normal_queue
().
new_round
(
quantum
,
handle_async
);
auto
&
nq
=
get_normal_queue
();
if
(
hq
.
new_round
(
quantum
*
3
,
handle_async
).
consumed_items
>
0
)
{
// After matching any message, all caches must be re-evaluated.
nq
.
flush_cache
();
}
if
(
nq
.
new_round
(
quantum
,
handle_async
).
consumed_items
>
0
)
{
// After matching any message, all caches must be re-evaluated.
hq
.
flush_cache
();
}
// Update metrics or try returning if the actor consumed nothing.
// Update metrics or try returning if the actor consumed nothing.
auto
delta
=
consumed
-
prev
;
auto
delta
=
consumed
-
prev
;
CAF_LOG_DEBUG
(
"consumed"
<<
delta
<<
"messages this round"
);
CAF_LOG_DEBUG
(
"consumed"
<<
delta
<<
"messages this round"
);
...
...
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