[vlc-devel] [PATCH 3/7] playlist/fetcher: refactor
filip at atch.se
Wed Mar 29 21:23:49 CEST 2017
On 2017-03-29 22:10, Rémi Denis-Courmont wrote:
> Le keskiviikkona 29. maaliskuuta 2017, 19.39.22 EEST Filip Roséen a écrit :
> > Hi Rémi,
> > On 2017-03-29 20:33, Rémi Denis-Courmont wrote:
> > > Le perjantaina 24. maaliskuuta 2017, 3.28.30 EEST Filip Roséen a écrit :
> > > > + vlc_interrupt_t interrupt;
> > > > + vlc_thread_t thread;
> > > > + atomic_bool active;
> > >
> > > This can´t be right. Either there is a lock and atomicity is not
> > > necessary, or this will race.
> > Could you elaborate on the potential race while keeping in mind the
> > *synchronizes-with* relationship in terms of operations on that
> > atomic?
> You have a mutex and an atomic for what looks like the same thing.
> Either one is too many, or there is a race.
They do not denote the same thing, if there was no album-cache the
lock would not be required.
I would also like to point out that the atomic and the lock lives in
different entities, there is no mutex and atomic that would be used to
refer/manage synchronization to the same set of data.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vlc-devel