Re: supporting notifications from backends



On Tue, 2004-03-30 at 16:47, Mark McLoughlin wrote:
> Hi David,

No... Dave. Unless you are, in fact, my grandmother. ;-)

> > Am I right? Some backends may have to increase complexity in order to
> > figure out whether the notification is due to their own change, and the
> > FIXME should catch this case anyway.
> 
> 	Yeah, pretty much. Obviously, its better if backends catch this
> themselves, though. It should be straightforward in most cases.

Depends on what is generating the notifications, but if its the backend,
then certainly.

> > Also I'm a little unclear on how threading might or might not work -
> > could I call the notify function from any thread, or am I best off
> > processing notifications whether the backend is called?
> 
> 	No, notifying from another thread isn't safe. You should invoke the
> notification from the main thread.

So presumably, on every call into the backend, I'd need to check for
notifications that need sending? How often, typically, does a backend
get called? I suppose sync_all gets called if nothing else.

Anyways, long way to go yet, I have to try to find the time to relearn
C, and learn glib, and try to cope without RAII.

Dave.




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