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

Rémi Denis-Courmont remi at remlab.net
Sat Jul 31 20:23:49 CEST 2010


Le samedi 31 juillet 2010 21:12:38 Juho Vähä-Herttua, vous avez écrit :
> On other platforms the semaphore is used to synchronize functions "Open"
> and "Thread", which run in different threads. On OSX I attempted to use
> the semaphore to synchronize functions "Close" and "Thread", from which I
> have no guarantee that they are run from the same thread.

You do have that guarantee. A thread cannot call module_unneed() (which calls 
pf_deactivate = Close) before a succesful *completed* call to module_need 
(which calls pf_activate = Open). Hence Close() cannot be called before 
Open().

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



More information about the vlc-devel mailing list