refactor: Make TraceThread a non-template free function

Also it is moved into its own module.
This commit is contained in:
Hennadii Stepanov
2021-04-13 20:44:46 +03:00
parent a1f0b8b62e
commit 30e4448215
11 changed files with 67 additions and 36 deletions

View File

@@ -15,6 +15,7 @@
#include <netbase.h>
#include <threadinterrupt.h>
#include <util/system.h>
#include <util/thread.h>
#ifdef USE_NATPMP
#include <compat.h>
@@ -255,7 +256,7 @@ void StartThreadMapPort()
{
if (!g_mapport_thread.joinable()) {
assert(!g_mapport_interrupt);
g_mapport_thread = std::thread(std::bind(&TraceThread<void (*)()>, "mapport", &ThreadMapPort));
g_mapport_thread = std::thread(std::bind(&util::TraceThread, "mapport", &ThreadMapPort));
}
}