[vlc-devel] [vlc-commits] addons: fix threading and cancelable sections

Tristan Matthews le.businessman at gmail.com
Thu Feb 20 20:12:30 CET 2014

On Thu, Feb 20, 2014 at 2:10 PM, Steinar H. Gunderson
<sgunderson at bigfoot.com> wrote:
> On Thu, Feb 20, 2014 at 09:04:43PM +0200, Rémi Denis-Courmont wrote:
>> How do you convince developers to use the would-be vlc_wait_for() macro
>> instead of vlc_cond_wait()? Removing the latter is not really an option.
>  1. Convert all existing code (where it makes sense). People tend to copy code
>     from other places when they write new code and are not intimately familiar
>     with the given APIs.
>  2. Add a warning to vlc_cond_wait() saying that using vlc_wait_for() instead
>     will likely save you a world of pain.
> Not perfect, I admit, and especially #1 is probably a significant chunk of
> work.

vlc_wait_for() would loop internally to avoid spurious wakes, I gather?

More information about the vlc-devel mailing list