--- /dev/null
+Return-Path: <adrien@bustany.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 8703B431FDA\r
+ for <notmuch@notmuchmail.org>; Thu, 19 Jul 2012 11:43:30 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id mpDBYcKwWOHV for <notmuch@notmuchmail.org>;\r
+ Thu, 19 Jul 2012 11:43:26 -0700 (PDT)\r
+Received: from mail.bustany.org (bustany.org [176.31.244.208])\r
+ by olra.theworths.org (Postfix) with ESMTP id B2E79431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 19 Jul 2012 11:43:26 -0700 (PDT)\r
+Received: from localhost.localdomain (91-158-2-79.elisa-laajakaista.fi\r
+ [91.158.2.79])\r
+ by mail.bustany.org (Postfix) with ESMTPSA id 964C7140090\r
+ for <notmuch@notmuchmail.org>; Thu, 19 Jul 2012 20:45:55 +0200 (CEST)\r
+From: Adrien Bustany <adrien@bustany.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 0/2] Add flush/reopen methods to notmuch_database_t\r
+Date: Thu, 19 Jul 2012 21:43:19 +0300\r
+Message-Id: <1342723401-26103-1-git-send-email-adrien@bustany.org>\r
+X-Mailer: git-send-email 1.7.7.6\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 19 Jul 2012 18:43:30 -0000\r
+\r
+Xapian (and therefore Notmuch? I would not mind a confirmation here) is\r
+thread safe as long as you don't share DB instances across threads. The\r
+database backend supports one writer and several concurrent readers.\r
+One possible model for multi threaded apps using Notmuch is to have one\r
+thread with a writable notmuch_database_t, and various with read-only\r
+notmuch_database_t instances. However, for the readers to see the\r
+changes done by the writer, the writer needs to flush the changes to\r
+disk, and the readers need to reopen the database.\r
+Those two patches add two methods to notmuch_database_t for this\r
+purpose (the signaling of the writer to the readers that they need to\r
+reopen is left to the application).\r
+\r
+Adrien Bustany (2):\r
+ Add notmuch_database_flush method\r
+ Add notmuch_database_reopen method\r
+\r
+ lib/database.cc | 35 +++++++++++++++++++++++++++++++++++\r
+ lib/notmuch.h | 12 ++++++++++++\r
+ 2 files changed, 47 insertions(+), 0 deletions(-)\r
+\r
+-- \r
+1.7.7.6\r
+\r