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
b1340ea2
Commit
b1340ea2
authored
May 11, 2017
by
Sebastian Woelke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add debug tracking for home execution unit
parent
0afd7caf
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
0 deletions
+24
-0
libcaf_core/caf/execution_unit.hpp
libcaf_core/caf/execution_unit.hpp
+4
-0
libcaf_core/caf/scheduled_actor.hpp
libcaf_core/caf/scheduled_actor.hpp
+9
-0
libcaf_core/caf/scheduler/worker.hpp
libcaf_core/caf/scheduler/worker.hpp
+4
-0
libcaf_core/caf/scoped_execution_unit.hpp
libcaf_core/caf/scoped_execution_unit.hpp
+5
-0
libcaf_core/src/scheduled_actor.cpp
libcaf_core/src/scheduled_actor.cpp
+2
-0
No files found.
libcaf_core/caf/execution_unit.hpp
View file @
b1340ea2
...
...
@@ -62,6 +62,10 @@ public:
proxies_
=
ptr
;
}
virtual
std
::
string
to_string
()
const
{
return
"execution unit has no description yet"
;
}
protected:
actor_system
*
system_
;
proxy_registry
*
proxies_
;
...
...
libcaf_core/caf/scheduled_actor.hpp
View file @
b1340ea2
...
...
@@ -83,6 +83,14 @@ class scheduled_actor : public local_actor, public resumable {
public:
// -- member types -----------------------------------------------------------
std
::
string
to_string_home_eu
()
const
{
return
home_eu_
->
to_string
();
}
std
::
string
to_string_current_eu
()
const
{
return
current_eu_
->
to_string
();
}
/// A reference-counting pointer to a `stream_handler`.
using
stream_handler_ptr
=
intrusive_ptr
<
stream_handler
>
;
...
...
@@ -695,6 +703,7 @@ protected:
/// Stores the home execution unit.
execution_unit
*
home_eu_
;
execution_unit
*
current_eu_
;
/// @endcond
};
...
...
libcaf_core/caf/scheduler/worker.hpp
View file @
b1340ea2
...
...
@@ -90,6 +90,10 @@ public:
return
id_
;
}
std
::
string
to_string
()
const
override
{
return
std
::
string
(
"id: "
)
+
std
::
to_string
(
static_cast
<
int
>
(
id
()));
}
std
::
thread
&
get_thread
()
{
return
this_thread_
;
}
...
...
libcaf_core/caf/scoped_execution_unit.hpp
View file @
b1340ea2
...
...
@@ -36,6 +36,11 @@ public:
/// It is assumed that `this` is never in the neighborhood of `ptr`.
bool
is_neighbor
(
execution_unit
*
ptr
)
const
override
;
std
::
string
to_string
()
const
override
{
return
"scoped_execution_unit"
;
}
};
}
// namespace caf
...
...
libcaf_core/src/scheduled_actor.cpp
View file @
b1340ea2
...
...
@@ -107,6 +107,7 @@ scheduled_actor::scheduled_actor(actor_config& cfg)
,
exception_handler_
(
default_exception_handler
)
# endif // CAF_NO_EXCEPTIONS
,
home_eu_
(
cfg
.
host
)
,
current_eu_
(
cfg
.
host
)
{
// nop
}
...
...
@@ -229,6 +230,7 @@ void scheduled_actor::intrusive_ptr_release_impl() {
resumable
::
resume_result
scheduled_actor
::
resume
(
execution_unit
*
ctx
,
size_t
max_throughput
)
{
current_eu_
=
ctx
;
CAF_PUSH_AID
(
id
());
if
(
!
activate
(
ctx
))
return
resume_result
::
done
;
...
...
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