[vlc-devel] [PATCH] vout/macosx: simplify close and make sure all AppKit objects are released on the main thread

Thomas Guillem thomas at gllm.fr
Thu Sep 19 13:23:44 CEST 2019


On Wed, Sep 18, 2019, at 23:17, David Fuhrmann wrote:
> 
> 
> > Am 18.09.2019 um 21:25 schrieb Felix Paul Kühne <fkuehne at videolan.org>:
> > 
> > Hi Thomas,
> > 
> >> On 18. Sep 2019, at 08:58, Thomas Guillem <thomas at gllm.fr> wrote:
> >> 
> >> We already know that we should not wait for the mainthread from the Close function, so it should be async.
> > 
> > OK!
> > 
> >> Why not using something like this ?
> >> 
> >>       [sys->glView performSelectorOnMainThread:@selector(release)
> >>                                     withObject:nil
> >>                                  waitUntilDone:NO];
> > 
> > dispatch_async on the main queue does exactly the same, but is slightly faster on execution. Additionally, using the block syntax greatly improves readability and you don’t need to switch context for each of the main thread calls within the Close function.
> 
> Hi,
> 
> dispatch_async seems ok for me as well. But I would probably try to get 
> rid of the sys usage in the block at all, and only capture the objc 
> object variables directly.

+1

> 
> BR. David
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list