[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Is KSharedConfig thread-safe ??
From:       Thiago Macieira <thiago () kde ! org>
Date:       2007-05-28 15:45:05
Message-ID: 200705281745.06035.thiago () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Paul Thomas wrote:
>From that definition that they gave, I would say yes.
>
>Referencing the description of KSharedConfig in the api doc, it inherits
>from two classes, KConfig and QSharedData.
>
>The Qt docs say that QSharedData is reentrant and KConfig is meant to
> use shared memory, which would have to be thread safe. Then there's
> KSharedConfig: provides a reference counted, shared memory variant of
> KConfig.
>
>So definitely.

Wrong conclusion.

KSharedConfig means the configuration is shared. That means you can use 
multiple objects to access the same config, from different places. 
Everything will work as expected.

But it's not thread-safe. It's not reentrant.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic