unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Floris Bruynooghe <flub@devork.be>, notmuch@notmuchmail.org
Subject: Re: Usage after database close
Date: Sun, 28 Jun 2020 19:24:40 -0300	[thread overview]
Message-ID: <877dvqltg7.fsf@tethera.net> (raw)
In-Reply-To: <87a70mlu24.fsf@tethera.net>

David Bremner <david@tethera.net> writes:


>> But part of my question is, *should* this be improved?  Am I
>> interpreting notmuch's intended API correctly?
>
> Well, I agree you should get NOTMUCH_STATUS_XAPIAN_EXCEPTION back, or we
> should change the docs to say "just don't do that".

Arguments in favour of the latter:

1) several API calls don't return notmuch_status_t, so can't literally
   return NOTMUCH_STATUS_XAPIAN_EXCEPTION

2) notmuch_message_get_{message,thread}_id promise never to return NULL,
   has no way to report errors.

I think it would probably make sense to say (if notmuch_database_reopen)
existed, that if you call notmuch_database_close, don't call anything
else except notmuch_database_reopen or notmuch_database_destroy.

d






  reply	other threads:[~2020-06-28 22:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28 13:57 Usage after database close Floris Bruynooghe
2020-06-28 16:19 ` David Bremner
2020-06-28 20:47   ` Floris Bruynooghe
2020-06-28 22:11     ` David Bremner
2020-06-28 22:24       ` David Bremner [this message]
2020-06-29 14:39         ` David Bremner
2020-06-29 21:18       ` Floris Bruynooghe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dvqltg7.fsf@tethera.net \
    --to=david@tethera.net \
    --cc=flub@devork.be \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).