[vlc-devel] [PATCH 1/3] Qt: Run mainloop on the main thread on OSX

Rémi Denis-Courmont remi at remlab.net
Mon Aug 2 11:21:01 CEST 2010


On Mon, 2 Aug 2010 11:34:36 +0300, Juho Vähä-Herttua <juhovh at iki.fi>
wrote:
> In case libvlc_Quit() is called before the handler is registered, there's
> the code in libvlc_SetExitHandler thread-safely inside a mutex that
checks
> for "exit->killed" and calls the new exit handler directly in case the
> libvlc_Quit() got called before libvlc_SetExitHandler().

I forgot I wrote that ugly hack a while ago., so I forgot to remove it.
Still, the current code is correct while the old code is hackish.

> So how to proceed in case where libvlc_SetExitHandler is first overridden
> and then libvlc_Quit() is called during libvlc_add_intf().

The signal gets posted but it's ignored until sigwait() or
pthread_sigmask(). 

The real problem with the idiotic Apple API is that we cannot run
sigwait(), so we cannot act on signals.

-- 
Rémi Denis-Courmont
http://www.remlab.net
http://fi.linkedin.com/in/remidenis




More information about the vlc-devel mailing list