From f9d4a0cbfb4b179120807a2c62bb184e2003c8aa Mon Sep 17 00:00:00 2001 From: sehraf Date: Wed, 1 Jun 2016 16:47:21 +0200 Subject: [PATCH] add names to gxs threads --- libretroshare/src/rsserver/p3face-config.cc | 4 ++-- libretroshare/src/rsserver/p3face.h | 4 ++-- libretroshare/src/rsserver/rsinit.cc | 26 ++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libretroshare/src/rsserver/p3face-config.cc b/libretroshare/src/rsserver/p3face-config.cc index 3124ee912..4448e9b96 100644 --- a/libretroshare/src/rsserver/p3face-config.cc +++ b/libretroshare/src/rsserver/p3face-config.cc @@ -71,9 +71,9 @@ void RsServer::ConfigFinalSave() mConfigMgr->completeConfiguration(); } -void RsServer::startServiceThread(RsTickingThread *t) +void RsServer::startServiceThread(RsTickingThread *t, const std::string &threadName) { - t->start() ; + t->start(threadName) ; mRegisteredServiceThreads.push_back(t) ; } diff --git a/libretroshare/src/rsserver/p3face.h b/libretroshare/src/rsserver/p3face.h index 18b1f488b..3d88e22fb 100644 --- a/libretroshare/src/rsserver/p3face.h +++ b/libretroshare/src/rsserver/p3face.h @@ -120,8 +120,8 @@ class RsServer: public RsControl, public RsTickingThread public: /* Config */ - virtual void ConfigFinalSave( ); - virtual void startServiceThread(RsTickingThread *t) ; + virtual void ConfigFinalSave( ); + virtual void startServiceThread(RsTickingThread *t, const std::string &threadName) ; /************* Rs shut down function: in upnp 'port lease time' bug *****************/ diff --git a/libretroshare/src/rsserver/rsinit.cc b/libretroshare/src/rsserver/rsinit.cc index 4a640c4ad..ab2c30dea 100644 --- a/libretroshare/src/rsserver/rsinit.cc +++ b/libretroshare/src/rsserver/rsinit.cc @@ -1768,27 +1768,27 @@ int RsServer::StartupRetroShare() //rsWire = mWire; /*** start up GXS core runner ***/ - startServiceThread(mGxsIdService); - startServiceThread(mGxsCircles); - startServiceThread(mPosted); + startServiceThread(mGxsIdService, "gxs id"); + startServiceThread(mGxsCircles, "gxs circle"); + startServiceThread(mPosted, "gxs posted"); #if RS_USE_WIKI - startServiceThread(mWiki); + startServiceThread(mWiki, "gxs wiki"); #endif - startServiceThread(mGxsForums); - startServiceThread(mGxsChannels); + startServiceThread(mGxsForums, "gxs forums"); + startServiceThread(mGxsChannels, "gxs channels"); //createThread(*mPhoto); //createThread(*mWire); // cores ready start up GXS net servers - startServiceThread(gxsid_ns); - startServiceThread(gxscircles_ns); - startServiceThread(posted_ns); + startServiceThread(gxsid_ns, "gxs id ns"); + startServiceThread(gxscircles_ns, "gxs circle ns"); + startServiceThread(posted_ns, "gxs posted ns"); #if RS_USE_WIKI - startServiceThread(wiki_ns); + startServiceThread(wiki_ns, "gxs wiki ns"); #endif - startServiceThread(gxsforums_ns); - startServiceThread(gxschannels_ns); + startServiceThread(gxsforums_ns, "gxs forums ns"); + startServiceThread(gxschannels_ns, "gxs channels ns"); //createThread(*photo_ns); //createThread(*wire_ns); @@ -1834,7 +1834,7 @@ int RsServer::StartupRetroShare() } /* Startup this thread! */ - start("RsServer main") ; + start("rs main") ; return 1; }