[gst-devel] thread id in debugging
Thomas Vander Stichele
thomas at apestaart.org
Thu Jul 8 07:38:06 CEST 2004
Hi all,
I had to debug some threading issues, and the lack of having something
in the debug log that could tell me what thread it was from was
painful. I put a print of g_thread_self in the debug handler.
I took a look at g_thread_self and it seems to me that, with a global
variable for the total thread count, and thread-specific data with
g_private_get/set for the current thread counter, I can easily implement
something like we used to have that prints process and thread id, where
thread id starts at 0 (for main thread) and each new thread
automatically gets a thread id from the debug handler if it didn't have
one yet.
What do you think ?
Thomas
More information about the gstreamer-devel
mailing list