From: Uwe Hermann Date: Mon, 27 Feb 2017 07:42:44 +0000 (+0100) Subject: instance.c: Add a debug message for thread creation. X-Git-Tag: libsigrokdecode-0.5.0~73 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=c22cbd433a6637466d5e142e900a117048024728;p=libsigrokdecode.git instance.c: Add a debug message for thread creation. --- diff --git a/instance.c b/instance.c index e80afd7..1753912 100644 --- a/instance.c +++ b/instance.c @@ -1054,9 +1054,12 @@ SRD_PRIV int srd_inst_decode(struct srd_decoder_inst *di, Py_DecRef(py_res); } else { /* If this is the first call, start the worker thread. */ - if (!di->thread_handle) - di->thread_handle = g_thread_new("di_thread", + if (!di->thread_handle) { + srd_dbg("No worker thread for this decoder stack " + "exists yet, creating one: %s.", di->inst_id); + di->thread_handle = g_thread_new(di->inst_id, di_thread, di); + } /* Push the new sample chunk to the worker thread. */ g_mutex_lock(&di->data_mutex);