unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 0/2] Add flush/reopen methods to notmuch_database_t
@ 2012-07-19 18:43 Adrien Bustany
  2012-07-19 18:43 ` [PATCH 1/2] Add notmuch_database_flush method Adrien Bustany
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Adrien Bustany @ 2012-07-19 18:43 UTC (permalink / raw)
  To: notmuch

Xapian (and therefore Notmuch? I would not mind a confirmation here) is
thread safe as long as you don't share DB instances across threads. The
database backend supports one writer and several concurrent readers.
One possible model for multi threaded apps using Notmuch is to have one
thread with a writable notmuch_database_t, and various with read-only
notmuch_database_t instances. However, for the readers to see the
changes done by the writer, the writer needs to flush the changes to
disk, and the readers need to reopen the database.
Those two patches add two methods to notmuch_database_t for this
purpose (the signaling of the writer to the readers that they need to
reopen is left to the application).

Adrien Bustany (2):
  Add notmuch_database_flush method
  Add notmuch_database_reopen method

 lib/database.cc |   35 +++++++++++++++++++++++++++++++++++
 lib/notmuch.h   |   12 ++++++++++++
 2 files changed, 47 insertions(+), 0 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-12-27  3:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19 18:43 [PATCH 0/2] Add flush/reopen methods to notmuch_database_t Adrien Bustany
2012-07-19 18:43 ` [PATCH 1/2] Add notmuch_database_flush method Adrien Bustany
2012-10-17 15:53   ` Ethan Glasser-Camp
2012-10-17 21:34     ` Adrien Bustany
2012-07-19 18:43 ` [PATCH 2/2] Add notmuch_database_reopen method Adrien Bustany
2012-10-17 21:52 ` [PATCH v2 0/2] Add flush/reopen methods to notmuch_database_t Adrien Bustany
2012-10-17 21:52   ` [PATCH 1/2] Add notmuch_database_flush method Adrien Bustany
2012-10-17 21:52   ` [PATCH 2/2] Add notmuch_database_reopen method Adrien Bustany
2012-10-19  3:19   ` [PATCH v2 0/2] Add flush/reopen methods to notmuch_database_t Ethan Glasser-Camp
2012-10-19  7:19   ` Jani Nikula
2012-10-20 15:49     ` Ethan Glasser-Camp
2012-10-25 18:39       ` Adrien Bustany
2012-12-12  1:40   ` Michael Forney
2012-12-27  3:23     ` David Bremner

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).