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

Juho Vähä-Herttua juhovh at iki.fi
Sat Jul 31 19:44:52 CEST 2010


On 31.7.2010, at 19.54, Rémi Denis-Courmont wrote:
> Le samedi 31 juillet 2010 18:47:31 Juho Vähä-Herttua, vous avez écrit :
>> ---
>> modules/gui/qt4/qt4.cpp |   23 ++++++++++++++++++++---
>> 1 files changed, 20 insertions(+), 3 deletions(-)
> 
> As already noted, the semaphore modifications look wrong.

Thanks for your comments. It would be useful to know why they look wrong, that way I don't have to iterate until they "look right". I've already had to go to the commit history and ask around to find reasons for some changes, because the code is mainly documented with "/* */" if anything.

I did notice this modification on mac leaves the semaphore in a state where it's posted one time more than waited before destroying. Last patch didn't have that issue, but was rejected anyway. (probably on same basis, since I didn't notice other reasons?) I don't see how destroying the semaphore in Close instead of Open makes any difference, since the global state is stored in the ugly one struct and semaphores should be thread safe.

Also, I can see you're a fan of global variables in qt4.cpp, but why not throw those in the intf_thread_t since it's available?


Juho

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4215 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100731/0616fbe0/attachment.bin>


More information about the vlc-devel mailing list