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
58015d19
Commit
58015d19
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
aaa35e0f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
0 deletions
+23
-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
+8
-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 @
58015d19
...
@@ -62,6 +62,10 @@ public:
...
@@ -62,6 +62,10 @@ public:
proxies_
=
ptr
;
proxies_
=
ptr
;
}
}
virtual
std
::
string
to_string
()
const
{
return
"execution unit has no description yet"
;
}
protected:
protected:
actor_system
*
system_
;
actor_system
*
system_
;
proxy_registry
*
proxies_
;
proxy_registry
*
proxies_
;
...
...
libcaf_core/caf/scheduled_actor.hpp
View file @
58015d19
...
@@ -88,6 +88,13 @@ public:
...
@@ -88,6 +88,13 @@ public:
/// A reference-counting pointer to a `stream_manager`.
/// A reference-counting pointer to a `stream_manager`.
using
stream_manager_ptr
=
intrusive_ptr
<
stream_manager
>
;
using
stream_manager_ptr
=
intrusive_ptr
<
stream_manager
>
;
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 container for associating stream IDs to handlers.
/// A container for associating stream IDs to handlers.
using
streams_map
=
std
::
unordered_map
<
stream_id
,
stream_manager_ptr
>
;
using
streams_map
=
std
::
unordered_map
<
stream_id
,
stream_manager_ptr
>
;
...
@@ -879,6 +886,7 @@ protected:
...
@@ -879,6 +886,7 @@ protected:
/// Stores the home execution unit.
/// Stores the home execution unit.
execution_unit
*
home_eu_
;
execution_unit
*
home_eu_
;
execution_unit
*
current_eu_
;
/// @endcond
/// @endcond
};
};
...
...
libcaf_core/caf/scheduler/worker.hpp
View file @
58015d19
...
@@ -90,6 +90,10 @@ public:
...
@@ -90,6 +90,10 @@ public:
return
id_
;
return
id_
;
}
}
std
::
string
to_string
()
const
override
{
return
std
::
string
(
"id: "
)
+
std
::
to_string
(
static_cast
<
int
>
(
id
()));
}
std
::
thread
&
get_thread
()
{
std
::
thread
&
get_thread
()
{
return
this_thread_
;
return
this_thread_
;
}
}
...
...
libcaf_core/caf/scoped_execution_unit.hpp
View file @
58015d19
...
@@ -36,6 +36,11 @@ public:
...
@@ -36,6 +36,11 @@ public:
/// It is assumed that `this` is never in the neighborhood of `ptr`.
/// It is assumed that `this` is never in the neighborhood of `ptr`.
bool
is_neighbor
(
execution_unit
*
ptr
)
const
override
;
bool
is_neighbor
(
execution_unit
*
ptr
)
const
override
;
std
::
string
to_string
()
const
override
{
return
"scoped_execution_unit"
;
}
};
};
}
// namespace caf
}
// namespace caf
...
...
libcaf_core/src/scheduled_actor.cpp
View file @
58015d19
...
@@ -107,6 +107,7 @@ scheduled_actor::scheduled_actor(actor_config& cfg)
...
@@ -107,6 +107,7 @@ scheduled_actor::scheduled_actor(actor_config& cfg)
,
exception_handler_
(
default_exception_handler
)
,
exception_handler_
(
default_exception_handler
)
# endif // CAF_NO_EXCEPTIONS
# endif // CAF_NO_EXCEPTIONS
,
home_eu_
(
cfg
.
host
)
,
home_eu_
(
cfg
.
host
)
,
current_eu_
(
cfg
.
host
)
{
{
// nop
// nop
}
}
...
@@ -229,6 +230,7 @@ void scheduled_actor::intrusive_ptr_release_impl() {
...
@@ -229,6 +230,7 @@ void scheduled_actor::intrusive_ptr_release_impl() {
resumable
::
resume_result
resumable
::
resume_result
scheduled_actor
::
resume
(
execution_unit
*
ctx
,
size_t
max_throughput
)
{
scheduled_actor
::
resume
(
execution_unit
*
ctx
,
size_t
max_throughput
)
{
current_eu_
=
ctx
;
CAF_PUSH_AID
(
id
());
CAF_PUSH_AID
(
id
());
if
(
!
activate
(
ctx
))
if
(
!
activate
(
ctx
))
return
resume_result
::
done
;
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