[notmuch] [PATCH] Calls to notmuch get queued and executed asynchronously.
David Edmondson
dme at dme.org
Fri Dec 30 02:52:17 PST 2011
On Fri, 21 Oct 2011 22:50:48 +0200, Daniel Schoepe <daniel at schoepe.org> wrote:
> On Tue, 23 Feb 2010 11:32:51 -0500, James Vasile <james at hackervisions.org> wrote:
> > Added notmuch-enqueue-asynch to replace calls to
> > notmuch-call-notmuch-process. Calls to notmuch are then queued and
> > executed asynchronously. If the db is busy and we get an error saying
> > it was locked, keep trying until the db is no longer busy. Errors go
> > in a buffer as per usual.
>
> I discovered this patch a while ago and it almost applies cleanly (the
> conflicts are easy to fix though) and it has made the emacs UI for
> notmuch _much_ more responsive and enjoyable for me. As discussed on
> IRC, issues such as where to handle retries in case the database is
> locked should probably be handled in the notmuch binary instead of each
> UI.
>
> I am however unaware of any patches to accomplish that and with the pace
> of development / patch reviews the way it is at the moment, this patch
> is a really helpful stop-gap (performing calls to notmuch asynchronously
> is useful independently of where concurrency issues are handled though)
> for me. If someone else agrees, I can fix the conflicts for this patch
> and send the revised version to the list.
It would be good to have an updated version of this patch if it is still
considered useful, though I don't suffer particularly from lag in the
emacs UI.
One concern is the string searching on the output of 'notmuch' to detect
the database locked condition. Perhaps 'notmuch' could be made to
return a specific error code in that case, negating the need to string
match?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111230/42d48223/attachment.pgp>
More information about the notmuch
mailing list