Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Friday 22 of April 2011, Julien Nabet wrote:
I think this line "nAcquireCount = Application::ReleaseSolarMutex() -
1;" should be added before the line 1850 :
if ( !bTerminateRequested && !rCmdLineArgs.IsInvisible() &&)

 In the code before the wrong commit, the SolarMutex stuff surrounds the 
Application::PostUserEvent() calls, so I think it belongs before them. Not 
quite sure if it's really needed, as it apparently has worked this way for 
some time, but I've commited a change to make it the way it was before the 
commit, thanks.

but

1) Before this line, there was also :
::vos::IMutex& rMutex = Application::GetSolarMutex();

if ( rMutex.tryToAcquire() )

I don't know if these are still useful

2) in the function doShutdown, there's only on line 1947 :
sal_uLong nAcquireCount = Application::ReleaseSolarMutex();

So i don't know too if -1 is necessary or not

 The solar mutex is a recursive mutex (can be acquire several times by the 
same thread), the tryToAcquire() call I'd guess is a test if the current 
thread has it acquired, but it seems to be pointless, as ReleaseSolarMutex() 
would just return 0 otherwise. The -1 is to compensate for this one 
additional acquire. Just confused and pointless, as far as I can say.

-- 
 Lubos Lunak
 l.lunak@suse.cz

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.