Commit b52b3770 authored by Dominik Charousset's avatar Dominik Charousset

Log a debug message if a stage is congested

parent bdcaba66
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "caf/downstream_msg.hpp" #include "caf/downstream_msg.hpp"
#include "caf/inbound_path.hpp" #include "caf/inbound_path.hpp"
#include "caf/logger.hpp"
namespace caf { namespace caf {
namespace policy { namespace policy {
...@@ -55,7 +56,10 @@ auto downstream_messages::id_of(mailbox_element& x) noexcept -> key_type { ...@@ -55,7 +56,10 @@ auto downstream_messages::id_of(mailbox_element& x) noexcept -> key_type {
} }
bool downstream_messages::enabled(const nested_queue_type& q) noexcept { bool downstream_messages::enabled(const nested_queue_type& q) noexcept {
return !q.policy().handler->mgr->congested(); auto congested = q.policy().handler->mgr->congested();
CAF_LOG_DEBUG_IF(congested, "path is congested:"
<< CAF_ARG2( "slot", q.policy().handler->slots.receiver));
return !congested;
} }
} // namespace policy } // namespace policy
......
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