[RFC] Split notmuch_database_close into two functions

Austin Clements amdragon at MIT.EDU
Sat Mar 31 20:23:23 PDT 2012


Quoth Justus Winter on Mar 21 at  1:55 am:
> I propose to split the function notmuch_database_close into
> notmuch_database_close and notmuch_database_destroy so that long
> running processes like alot can close the database while still using
> data obtained from queries to that database.

Is this actually safe?  My understanding of Xapian::Database::close is
that, once you've closed the database, basically anything can throw a
Xapian exception.  A lot of data is retrieved lazily, both by notmuch
and by Xapian, so simply having, say, a notmuch_message_t object isn't
enough to guarantee that you'll be able to get data out of it after
closing the database.  Hence, I don't see how this interface could be
used correctly.

Maybe you could describe your use case in more detail?


More information about the notmuch mailing list