CVSROOT: /cvs/gnome
Module name: beagle
Changes by: rml 05/03/12 19:11:31
Modified files:
Util : Inotify.cs
beagled/BlamQueryable: BlamQueryable.cs
beagled/CalendarQueryable: CalendarQueryable.cs
beagled/EvolutionMailDriver: EvolutionMailDriver.cs
beagled/FileSystemQueryable: InotifyBackend.cs
beagled/GaimLogQueryable: GaimLogQueryable.cs
beagled/LauncherQueryable: LauncherQueryable.cs
beagled/LifereaQueryable: LifereaQueryable.cs
beagled/MonodocQueryable: MonodocQueryable.cs
beagled/TomboyQueryable: TomboyQueryable.cs
Log message:
Oh boy, this is a pretty one. Change the prototype of Inotify.Event to
not include the cookie. Who needs a cookie, anyhow? Then add support for
unmatched events. We only have to worry about MovedFrom events, because
MovedTo's always proceed a MovedFrom. For MovedTo events, we store each
pending event in PendingMove and expire them every 5 seconds. After 5 seconds
without a corresponding MovedFrom, we sent out the event. Otherwise, if there
is a corresponding MovedTo, we send out just the MovedTo with a srcpath
argument equal to the MovedFrom's argument. For unmatched events, we send
out the singleton MovedTo or MovedFrom with srcpath=null.
One tricky race is when we get another move event on the file while waiting
to expire a given MovedFrom. Say one does
"mv foo /not/watching;mv /not/watching/foo ."
Then the MovedFrom, queued and waiting to expire, is delivered _after_ the
MovedTo. We handle this case by checking for pending MovedFrom events, during
a MovedTo event, with matching directory (watches) and filenames. If we find
such an event, we dispatch it immediately and remove it from the expiration
list.
Sigh. Not pretty. But I think it all works.
URL :
http://cvs.gnome.org/bonsai/cvsquery.cgi?branch=&dir=beagle&who=rml&date=explicit&mindate=2005-03-12%2019:10&maxdate=2005-03-12%2019:12
_______________________________________________
cvs-commits-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/cvs-commits-list