[vlc-devel] [PATCH] vout/macosx: simplify close and make sure all AppKit objects are released on the main thread
Felix Paul Kühne
fkuehne at videolan.org
Wed Sep 18 21:25:46 CEST 2019
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.
Best regards,
Felix
More information about the vlc-devel
mailing list