Skip to content

Commit 62ade6b

Browse files
committed
mgr/ActivePyModule: build thread name with fmt
Signed-off-by: Max Kellermann <[email protected]>
1 parent 9d47b16 commit 62ade6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mgr/ActivePyModule.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
#include "PyModuleRunner.h"
2828
#include "PyModule.h"
2929

30+
#include <fmt/core.h>
31+
3032
#include <vector>
3133
#include <string>
3234

@@ -54,7 +56,7 @@ class ActivePyModule : public PyModuleRunner
5456
ActivePyModule(const PyModuleRef &py_module_,
5557
LogChannelRef clog_)
5658
: PyModuleRunner(py_module_, clog_),
57-
fin_thread_name(std::string("m-fin-" + py_module->get_name()).substr(0,15)),
59+
fin_thread_name(fmt::format("m-fin-{}", py_module->get_name()).substr(0,15)),
5860
finisher(g_ceph_context, thread_name, fin_thread_name)
5961

6062
{

0 commit comments

Comments
 (0)