From 61f3c56ba7c86e686b1671f675569e21b0c6bc44 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Wed, 12 Feb 2014 13:13:36 -0400 Subject: remove early notification on append for now this can be done to save some msec, but additional measures have to be taken to avoid inconsistencies with reads right after this is done. we could make those wait until a second deferred is done, for example. --- mail/src/leap/mail/imap/messages.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'mail/src') diff --git a/mail/src/leap/mail/imap/messages.py b/mail/src/leap/mail/imap/messages.py index a49ea908..fc1ec554 100644 --- a/mail/src/leap/mail/imap/messages.py +++ b/mail/src/leap/mail/imap/messages.py @@ -923,13 +923,14 @@ class MessageCollection(WithMsgFields, IndexedDB, MailParser, MBoxParser): return uid = self.memstore.increment_last_soledad_uid(self.mbox) - # We can say the observer that we're done at this point. - # Make sure it has no serious consequences if we're issued - # a fetch command right after... - self.reactor.callFromThread(observer.callback, uid) + + # We can say the observer that we're done at this point, but + # before that we should make sure it has no serious consequences + # if we're issued, for instance, a fetch command right after... + #self.reactor.callFromThread(observer.callback, uid) # if we did the notify, we need to invalidate the deferred # so not to try to fire it twice. - observer = None + #observer = None fd = self._populate_flags(flags, uid, chash, size, multi) hd = self._populate_headr(msg, chash, subject, date) -- cgit v1.2.3