winpr-thread: a better error message and comments about thread_list

This commit is contained in:
Emmanuel Ledoux 2015-05-26 18:15:57 +02:00 committed by eledoux
parent 56f34582c7
commit f74cd12df2

View File

@ -299,11 +299,9 @@ static void* thread_launcher(void* arg)
* actually done.*/ * actually done.*/
thread->thread = pthread_self(); thread->thread = pthread_self();
/* also done by winpr_StartThread(). This ensures thread_list
* was updated before the thread could exit */
if (!ListDictionary_Add(thread_list, &thread->thread, thread)) if (!ListDictionary_Add(thread_list, &thread->thread, thread))
{ {
WLog_ERR(TAG, "Thread function argument is %p", fkt); WLog_ERR(TAG, "failed to add the thread to the thread list");
goto exit; goto exit;
} }