[vlc-devel] [RFC PATCH 0/3] decoder: mutexes and conds cleanup

Rémi Denis-Courmont remi at remlab.net
Wed Apr 1 19:15:04 CEST 2015

Le mercredi 01 avril 2015, 19:02:16 Thomas Guillem a écrit :
> I always wondered if I should use one condition variable per direction,
> I don't always do it. I think it's better for code clarity, but I don't
> see any others advantages. Anyway, I agree, I'll try to do that in the
> future.

If you *can* use more than one CV, there are no definite rules that says that 
you should or should not do so. From performance point of view, the more, the 
merrier - avoids useless wake-ups and processing.

In particular, I don't really see the point in merging the internal FIFO and 
the wait_request CV, even though they are used in the same direction. Plus it 
would require that they use the same lock - which they do not currently.

Rémi Denis-Courmont

More information about the vlc-devel mailing list