[gst-devel] thread id in debugging
Benjamin Otte
in7y118 at public.uni-hamburg.de
Fri Jul 9 05:49:02 CEST 2004
Quoting Thomas Vander Stichele <thomas at apestaart.org>:
> ... if g_thread_self is ok, I don't see why writing something similar
> called gst_thread_id would fail.
>
Hm yeah, you could use something like if (!gst_thread_id_computed) {
gst_thread_id_compute () }; which would obviously work with all threads, though
it might get to wrong ids because of races and/or debugging disabled/enabled in
only parts of the code.
I had thought you meant initializing a private in gst_thread_run and using that.
Anyway, as long as it works for any thread created with g_thread_create, it's
fine with me - as long as it offers a real benefit to just using g_thread_self
and doesn't irritate people.
Benjamin
More information about the gstreamer-devel
mailing list