aboutsummaryrefslogtreecommitdiff
path: root/src/common/download.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-02-28 22:14:19 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-03-05 16:59:29 +0000
commitf36c5f1e084e2591da5bdd92d4dd4713f4312415 (patch)
tree7695bf6869041a81c64c3618a6e4305bcbfadc1f /src/common/download.cpp
parentcore: make update download cancellable (diff)
downloadmonero-f36c5f1e084e2591da5bdd92d4dd4713f4312415.tar.xz
download: give download threads distinct names
Diffstat (limited to 'src/common/download.cpp')
-rw-r--r--src/common/download.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/download.cpp b/src/common/download.cpp
index 9c2330b10..b2f95b21a 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 <string>
+#include <atomic>
#include <boost/filesystem.hpp>
#include <boost/asio.hpp>
#include <boost/thread/thread.hpp>
@@ -59,6 +60,10 @@ namespace tools
static void download_thread(download_async_handle control)
{
+ static std::atomic<unsigned int> 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) {}