Commit 923e91c3 authored by Dominik Charousset's avatar Dominik Charousset

Log scoped and blocking actors too

parent 5a61e5da
This diff is collapsed.
......@@ -47,6 +47,7 @@
#include "caf/mixin/memory_cached.hpp"
#include "caf/detail/logging.hpp"
#include "caf/detail/behavior_stack.hpp"
#include "caf/detail/typed_actor_util.hpp"
#include "caf/detail/single_reader_queue.hpp"
......
......@@ -61,8 +61,8 @@ class event_based_resume {
size_t max_throughput) override {
CAF_REQUIRE(max_throughput > 0);
auto d = static_cast<Derived*>(this);
d->host(new_host);
CAF_LOG_TRACE("id = " << d->id());
d->host(new_host);
auto done_cb = [&]() -> bool {
CAF_LOG_TRACE("");
d->bhvr_stack().clear();
......
......@@ -89,6 +89,7 @@ class invoke_policy {
if (!node_ptr) {
return false;
}
CAF_LOG_TRACE("");
switch (handle_message(self, node_ptr.get(), fun, awaited_response)) {
case hm_msg_handled:
node_ptr.reset();
......
......@@ -6,6 +6,7 @@
#include "caf/exception.hpp"
#include "caf/exit_reason.hpp"
#include "caf/detail/logging.hpp"
#include "caf/policy/resume_policy.hpp"
namespace caf {
......@@ -29,6 +30,7 @@ class no_resume {
}
resumable::resume_result resume(execution_unit*, size_t) {
CAF_LOG_TRACE("");
uint32_t rsn = exit_reason::normal;
try {
this->act();
......
......@@ -34,7 +34,9 @@ namespace caf {
namespace {
struct impl : blocking_actor {
void act() override {}
void act() override {
CAF_LOG_ERROR("act() of scoped_actor impl called");
}
};
blocking_actor* alloc() {
......@@ -48,10 +50,11 @@ blocking_actor* alloc() {
void scoped_actor::init(bool hide_actor) {
m_self.reset(alloc());
m_self->is_registered(!hide_actor);
if (!hide_actor) {
m_prev = CAF_SET_AID(m_self->id());
}
CAF_LOG_TRACE(CAF_ARG(hide_actor));
m_self->is_registered(!hide_actor);
}
scoped_actor::scoped_actor() {
......@@ -63,6 +66,7 @@ scoped_actor::scoped_actor(bool hide_actor) {
}
scoped_actor::~scoped_actor() {
CAF_LOG_TRACE("");
if (m_self->is_registered()) {
CAF_SET_AID(m_prev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment