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
428b9594
Commit
428b9594
authored
Oct 18, 2017
by
Sebastian Woelke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for testing
parent
79084c06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
6 deletions
+23
-6
benchmarks
benchmarks
+1
-1
libcaf_core/caf/scheduled_actor.hpp
libcaf_core/caf/scheduled_actor.hpp
+15
-2
libcaf_core/src/scheduled_actor.cpp
libcaf_core/src/scheduled_actor.cpp
+7
-3
No files found.
benchmarks
@
d19bcea5
Subproject commit
9f02100b879d429b6abe84a159098184bca864ef
Subproject commit
d19bcea54d5edfec3930a4cdb5a936a0dee143f5
libcaf_core/caf/scheduled_actor.hpp
View file @
428b9594
...
...
@@ -89,10 +89,23 @@ public:
using
stream_manager_ptr
=
intrusive_ptr
<
stream_manager
>
;
std
::
string
to_string_home_eu
()
const
{
return
home_eu_
->
to_string
();
if
(
home_eu_
)
{
return
home_eu_
->
to_string
();
}
else
{
return
"nullptr"
;
}
}
std
::
string
to_string_current_eu
()
const
{
return
current_eu_
->
to_string
();
if
(
home_eu_
)
{
return
current_eu_
->
to_string
();
}
else
{
return
"nullptr"
;
}
}
void
reset_home_eu
()
{
home_eu_
=
nullptr
;
}
/// A container for associating stream IDs to handlers.
...
...
libcaf_core/src/scheduled_actor.cpp
View file @
428b9594
...
...
@@ -139,7 +139,7 @@ void scheduled_actor::enqueue(mailbox_element_ptr ptr, execution_unit* eu) {
}
else
{
if
(
eu
)
{
// msg is received from an other scheduled actor
if
(
eu
==
home_eu_
||
eu
->
is_neighbor
(
home_eu_
))
{
if
(
!
home_eu_
||
eu
==
home_eu_
||
eu
->
is_neighbor
(
home_eu_
))
{
eu
->
exec_later
(
this
,
true
);
// internal enqueue
}
else
{
// `eu` has a high memory distance to this actor
...
...
@@ -147,7 +147,11 @@ void scheduled_actor::enqueue(mailbox_element_ptr ptr, execution_unit* eu) {
}
}
else
{
// msg is received from non-actor or context or from a detached actor
home_eu_
->
exec_later
(
this
,
false
);
// external enqueue
if
(
home_eu_
)
{
home_eu_
->
exec_later
(
this
,
false
);
// external enqueue
}
else
{
home_system
().
scheduler
().
enqueue
(
this
);
}
}
}
break
;
...
...
@@ -577,7 +581,7 @@ bool scheduled_actor::activate(execution_unit* ctx) {
return
false
;
}
else
{
CAF_LOG_DEBUG
(
"initialized actor:"
<<
CAF_ARG
(
name
())
<<
CAF_ARG
(
ctx
));
if
(
home_eu_
!=
ctx
)
{
if
(
home_eu_
&&
home_eu_
!=
ctx
)
{
if
(
home_eu_
==
system
().
dummy_execution_unit
())
{
home_eu_
=
ctx
;
}
else
if
(
home_eu_
->
is_neighbor
(
ctx
))
{
...
...
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