Commit 428b9594 authored by Sebastian Woelke's avatar Sebastian Woelke

for testing

parent 79084c06
benchmarks @ d19bcea5
Subproject commit 9f02100b879d429b6abe84a159098184bca864ef Subproject commit d19bcea54d5edfec3930a4cdb5a936a0dee143f5
...@@ -89,10 +89,23 @@ public: ...@@ -89,10 +89,23 @@ public:
using stream_manager_ptr = intrusive_ptr<stream_manager>; using stream_manager_ptr = intrusive_ptr<stream_manager>;
std::string to_string_home_eu() const { std::string to_string_home_eu() const {
if (home_eu_) {
return home_eu_->to_string(); return home_eu_->to_string();
} else {
return "nullptr";
} }
}
std::string to_string_current_eu() const { std::string to_string_current_eu() const {
if (home_eu_) {
return current_eu_->to_string(); return current_eu_->to_string();
} else {
return "nullptr";
}
}
void reset_home_eu() {
home_eu_ = nullptr;
} }
/// A container for associating stream IDs to handlers. /// A container for associating stream IDs to handlers.
......
...@@ -139,7 +139,7 @@ void scheduled_actor::enqueue(mailbox_element_ptr ptr, execution_unit* eu) { ...@@ -139,7 +139,7 @@ void scheduled_actor::enqueue(mailbox_element_ptr ptr, execution_unit* eu) {
} else { } else {
if (eu) { if (eu) {
// msg is received from an other scheduled actor // 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 eu->exec_later(this, true); // internal enqueue
} else { } else {
// `eu` has a high memory distance to this actor // `eu` has a high memory distance to this actor
...@@ -147,7 +147,11 @@ void scheduled_actor::enqueue(mailbox_element_ptr ptr, execution_unit* eu) { ...@@ -147,7 +147,11 @@ void scheduled_actor::enqueue(mailbox_element_ptr ptr, execution_unit* eu) {
} }
} else { } else {
// msg is received from non-actor or context or from a detached actor // msg is received from non-actor or context or from a detached actor
if (home_eu_) {
home_eu_->exec_later(this, false); // external enqueue home_eu_->exec_later(this, false); // external enqueue
} else {
home_system().scheduler().enqueue(this);
}
} }
} }
break; break;
...@@ -577,7 +581,7 @@ bool scheduled_actor::activate(execution_unit* ctx) { ...@@ -577,7 +581,7 @@ bool scheduled_actor::activate(execution_unit* ctx) {
return false; return false;
} else { } else {
CAF_LOG_DEBUG("initialized actor:" << CAF_ARG(name()) << CAF_ARG(ctx)); 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()) { if (home_eu_ == system().dummy_execution_unit()) {
home_eu_ = ctx; home_eu_ = ctx;
} else if (home_eu_->is_neighbor(ctx)) { } else if (home_eu_->is_neighbor(ctx)) {
......
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