From f36c5f1e084e2591da5bdd92d4dd4713f4312415 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 28 Feb 2017 22:14:19 +0000 Subject: [PATCH] download: give download threads distinct names --- src/common/download.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common/download.cpp b/src/common/download.cpp index 9c2330b1..b2f95b21 100644 --- a/src/common/download.cpp +++ b/src/common/download.cpp @@ -27,6 +27,7 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include +#include #include #include #include @@ -59,6 +60,10 @@ namespace tools static void download_thread(download_async_handle control) { + static std::atomic thread_id(0); + + MLOG_SET_THREAD_NAME("DL" + std::to_string(thread_id++)); + struct stopped_setter { stopped_setter(const download_async_handle &control): control(control) {}