[vlc-devel] [PATCH] vout/macosx: simplify close and make sure all AppKit objects are released on the main thread
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.
> 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.
> BR. David
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
More information about the vlc-devel