Set Thread name to aid debugging

This commit is contained in:
Robin Gareus 2021-06-14 01:29:16 +02:00
parent 95f8a3aace
commit ec131fcb70
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -355,6 +355,9 @@ ExportHandler::command_output(std::string output, size_t size)
void*
ExportHandler::start_timespan_bg (void* eh)
{
char name[64];
snprintf (name, 64, "Export-TS-%p", (void*)DEBUG_THREAD_SELF);
pthread_set_name (name);
ExportHandler* self = static_cast<ExportHandler*> (eh);
self->process_connection.disconnect ();
Glib::Threads::Mutex::Lock l (self->export_status->lock());