[vlc-devel] commit: Lua SD: let the user know we are working (Fabio Ritrovato )

Jakob Leben jakob.leben at gmail.com
Wed Feb 24 15:32:10 CET 2010


2010/2/24 Rémi Denis-Courmont <remi at remlab.net>

>
> On Wed, 24 Feb 2010 10:00:48 +0100, Jakob Leben <jakob.leben at gmail.com>
> wrote:
> > I believe the services_discovery_t: b_loading field should be protected
> by
> > some mutex, which services_discovery_t does not have yet.
>
> Why?
>
> The loading boolean has to be synchronized at a higher level. Adding a
> mutex here would just be a kludge to work around a would-be race condition
> at an higher level.
>

Well, I assumed that reading and writing a boolean from two different
threads (SD and intf) might not be safe - could result in corrupted data
being read. But maybe it is safe to assume that it is always atomic.


> B: Or remove the b_loading field and pass the loading state as bool
> through
> callbacks all the way until Qt intf.

 Yes, this does probably not need to be kept in the core.
>

I stil think it is useful to have that in the core in case an interface
wants to know the state even if it missed the state change event.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100224/8fee5ce0/attachment.html>


More information about the vlc-devel mailing list