Re: GConfChangeset API's



On Thu, 2007-06-28 at 13:58 +0100, Umang Gupta wrote:

> I want to know the behaviour of gconf changeset api's.. ( I found as
> non-atomic)..

> when we do  commitment by gconf_client_commit_changeset() ..the key
> values are not updated in the Gconfdatabase instantly.. 

this has nothing to do with changesets being atomic or not. in theory,
the atomicity of a changeset would imply that every key in that set is
changed at the same time and you get a single change notification.

> so if I read the same key  just after commitment using
> gconf_client_get_*() .. I get the non updated value from  Gconf
> database..     

this condition always holds: GConf will commit the values to the db as
soon as it can, but there are no guarantees (and never were) that the
commit will indeed happen as soon as you set a key; in fact, it would be
bad if this happened (synchronous behaviours are never optimal).

You have to attach a listener to the keys you want to monitor and get
the value inside the callback function.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]