Glib: Gthread: unique thread id question


Is there any function that provides unique id for each thread? In documentation I've read about GThread structure and g_thread_self() function. Although there is no statement that GThread* returned by g_thread_self() is unique for calling thread.

Small test example has revealed that g_thread_self() is unique for any thread created with g_thread_create(). But for threads created with pthread_create() I've seen that sometimes g_thread_self() returned same pointer for different threads.

   Anton Pak

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]