move thread naming to util

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2020-12-07 06:22:16 +03:00
parent aace200899
commit 3100d4f902
12 changed files with 63 additions and 39 deletions

View file

@ -1,7 +1,6 @@
#ifdef USE_UPNP
#include <string>
#include <thread>
#include <pthread.h>
#include <boost/thread/thread.hpp>
#include <boost/asio.hpp>
@ -61,7 +60,8 @@ namespace transport
void UPnP::Run ()
{
pthread_setname_np(pthread_self(), "UPnP");
i2p::util::SetThreadName("UPnP");
while (m_IsRunning)
{
try