Re: [PATCH v2] lib: Simplify close and codify aborting atomic section

Subject: Re: [PATCH v2] lib: Simplify close and codify aborting atomic section

Date: Wed, 24 Sep 2014 14:28:39 -0700

To: Austin Clements

Cc: notmuch@notmuchmail.org

From: W. Trevor King


On Wed, Sep 24, 2014 at 05:20:23PM -0400, Austin Clements wrote:
> diff --git a/lib/notmuch.h b/lib/notmuch.h
> index fe2340b..5c40c67 100644
> --- a/lib/notmuch.h
> +++ b/lib/notmuch.h
> @@ -292,6 +292,11 @@ notmuch_database_open (const char *path,
>   * notmuch_database_close can be called multiple times.  Later calls
>   * have no effect.
>   *
> + * If the caller is currently in an atomic section (there was a
> + * notmuch_database_begin_atomic without a matching
> + * notmuch_database_end_atomic), this will abort the atomic section,
> + * discarding any modifications made in the atomic section.
> + *
>   * Return value:
>   *
>   * NOTMUCH_STATUS_SUCCESS: Successfully closed the database.

Still no mention of “commit” or “if you're not in an atomic section”
;).

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
signature.asc (application/pgp-signature)

Thread: