GNOME Bugzilla – Bug 632168
[gsttask] MSVC thread names for task debugging
Last modified: 2010-12-02 18:03:11 UTC
Created attachment 172385 [details] [review] Sets task names as thread names for MSVC debugging The attached patch allows setting thread names for MSVC debugging in gst_task_configure_name().
Doesn't this require a C++ compiler to be used because of try-except? Also it would be good to print some kind of warning if the setting of the thread name failed, similar to the Linux code.
It's guarded by looking for the MSVC compiler which it works fine on and is intended only for use with the MSVC debugger and/or the SDK debugger. Any other debugger (e.g. GDB) would/should be incompatible. As such, since the compiler supports it, it's not a problem. It's also the only way to do it in native code w/ MSVC. It's only for debug use and will only work for new threads that are started if the debugger is already attached. It's not a problem or an error if it didn't work. Besides, RaiseException() is void and I have no way of knowing if it succeeded or not.
So the MSVC C compiler understands some C++ constructs? That's great ;) I guess the patch is fine then, I'll push it after the release :)
commit 7199a4f1ff71c422cb682fb5d78b6cc1a5f11e91 Author: David Hoyt <dhoyt@llnl.gov> Date: Wed Oct 20 10:18:18 2010 +0200 gsttask: Set thread names on Windows with MSVC if a debugger is attached Fixes bug #632168.