[vlc-devel] [PATCH] Deprecate vlc_clone_detach()

Rémi Denis-Courmont remi at remlab.net
Mon Sep 7 17:27:52 CEST 2020


Le maanantaina 7. syyskuuta 2020, 12.48.29 EEST Alexandre Janniaux a écrit :
> If we need this function to be implemented safely, we can probably
> do the same as posix synchronization primitives and implement the
> detach ourself with some intricated ways and smart resource deletion
> but it looks more like a maintenance burden with sharp edges.

I don't think that's as practical as you think. You need something like 
FreeLibraryAndExitThread(). You need a function to signal the end, and 
actually exit without returning to the caller, and it needs to be in a library 
that will *not* be unloaded.

Save for creating a small shared object with just the one function, that you'd 
dlopen() manually and never dlclose(), I don't know how to achieve it.

> In general, I prefer a joined thread which require a more structural
> approach to the issues mentionned by Romain, making it a bit less easy
> to write, but also a bit easier to follow and less resource-management
> error prone.
> 
> There's a typo in the commit message though, «functon».

Ah, right.

-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list