move QCoreApplication::addLibraryPath call from KApplication to KComponentData

Thiago Macieira thiago at kde.org
Thu Nov 13 07:37:40 GMT 2008


Maksim Orlovich wrote:
>> You can use a mutex to ensure that only one initialisation happens
>> and, if any
>> other threads enter that code path, they will wait for the
>> initialisation to
>> finish.
>>
>> That's what a function-local static does in gcc:
>>
>> 	static bool initialised = lazyInit();
>
>kdelibs is built with -fno-threadsafe-statics, though; doesn't it
> disable this?

We removed that flag because it caused gcc to miscompile, have we added it 
back?

In any case, I meant that as an example. It shouldn't be used because 
other compilers do not have thread-safe statics.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081113/8f27379f/attachment.sig>


More information about the kde-core-devel mailing list