Skip to content

Commit

Permalink
Differentiate IPC io context threads
Browse files Browse the repository at this point in the history
  • Loading branch information
pwojcikdev committed Nov 27, 2024
1 parent 5455e34 commit 179dd04
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions nano/lib/thread_roles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ std::string nano::thread_role::get_string (nano::thread_role::name role)
case nano::thread_role::name::io_daemon:
thread_role_name_string = "I/O (daemon)";
break;
case nano::thread_role::name::io_ipc:
thread_role_name_string = "I/O (IPC)";
break;
case nano::thread_role::name::work:
thread_role_name_string = "Work pool";
break;
Expand Down
1 change: 1 addition & 0 deletions nano/lib/thread_roles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ enum class name
unknown,
io,
io_daemon,
io_ipc,
work,
message_processing,
vote_processing,
Expand Down
2 changes: 1 addition & 1 deletion nano/node/ipc/ipc_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ class socket_transport : public nano::ipc::transport
acceptor->set_option (option_keepalive);
accept ();

runner = std::make_unique<nano::thread_runner> (io_ctx, server.logger, static_cast<unsigned> (std::max (1, concurrency_a)));
runner = std::make_unique<nano::thread_runner> (io_ctx, server.logger, static_cast<unsigned> (std::max (1, concurrency_a)), nano::thread_role::name::io_ipc);
}

boost::asio::io_context & context () const
Expand Down

0 comments on commit 179dd04

Please sign in to comment.