Skip to content

thread: add a function to give names to threads

Steve Lhomme requested to merge robUx4/vlc:threads-name into master

Given the amount of threads used by VLC it can be useful to known which thread is what when debugging or in a backtrace (especially if the stack is bogus, we can get a hint at where the thread comes from).

This feature is supported in the Windows debugger when used on Windows 10 1607 and upper. There might be support in gdb on other platforms as well.

It may not do anything on some platforms but these platforms probably don't show the thread name in debuggers anyway.

A "static" name may be set during vlc_clone() which may provide wider support. But it doesn't seem necessary for now. The "dynamic" version (a setter function) allows setting a name in executors as well (not done in this MR) rather than a generic name.

Ref #26825 (closed)

Merge request reports