[vlc-devel] [PATCH v3 1/4] thread: add a function to give names to threads

Steve Lhomme robux4 at ycbcr.xyz
Thu Nov 12 12:45:44 CET 2020


On 2020-11-12 12:35, Alexandre Janniaux wrote:
> Hi,
> 
> On Tue, Nov 10, 2020 at 12:05:47PM +0100, Steve Lhomme wrote:
>> +#elif defined(__APPLE__)
>> +void vlc_thread_set_name(const char *name)
>> +{
>> +    pthread_setname_np(name);
>> +}
> 
> Does it work with xcode / lldb? Maybe it also needs setting
> the same NSThread property too?

I have no way to know. All I know is that it compiles and that's what 
dav1d uses.

It seems [1] that a similar thing exists for NSThread but that is 10 
years old and I don't know if it's used in XCode or not. Also since we 
don't use NSThread to create thread it may have no effect on our code at 
all.

[1] https://stackoverflow.com/a/3380861/1266123


More information about the vlc-devel mailing list