]> git.notmuchmail.org Git - notmuch/commit
lib: Wrap notmuch_database_add_message in an atomic section.
authorAustin Clements <amdragon@mit.edu>
Sat, 11 Jun 2011 04:42:58 +0000 (00:42 -0400)
committerDavid Bremner <bremner@debian.org>
Sat, 24 Sep 2011 23:00:28 +0000 (20:00 -0300)
commit51c3c0b2d27c8d0ba8e1ae242fd907c59f82d992
tree57b117ffe9c30fdb9fa958d619825590963867fd
parent7a8046ced8c0e61ddd0ff463cfc17ed63e6edad3
lib: Wrap notmuch_database_add_message in an atomic section.

Adding a message may involve changes to multiple database documents,
and thus needs to be done in a transaction.  This makes add_message
(and, I think, the whole library) atomicity-safe: library callers only
needs to use atomic sections if they needs atomicity across multiple
library calls.
lib/database.cc