From b51afbdfb975b676cb885fc4f3559944f99df030 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 25 Aug 2023 10:40:47 +0200 Subject: Core/Logging: Fixed log message order not being preserved when async logging was enabled and ThreadPool was greater than 1 Despite that issue, logging was still threadsafe, just not ordered properly --- src/common/Asio/Strand.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/common/Asio') diff --git a/src/common/Asio/Strand.h b/src/common/Asio/Strand.h index 5beef144c60..942ddf55cd4 100644 --- a/src/common/Asio/Strand.h +++ b/src/common/Asio/Strand.h @@ -35,7 +35,11 @@ namespace Trinity Strand(IoContext& ioContext) : boost::asio::io_context::strand(ioContext) { } }; - using boost::asio::bind_executor; + template + inline decltype(auto) post(boost::asio::io_context::strand& strand, T&& t) + { + return boost::asio::post(strand, std::forward(t)); + } } } -- cgit v1.2.3