Kevin Boulain <kevin@boula.in> writes: > So, is Notmuch expected to be thread safe? There are some indications it > should be (e.g.: lib/init.cc has locking) but all instances of > Xapian::Query::MatchAll would have to be replaced. > Xapian states it's thread safe: > https://github.com/xapian/xapian-docsprint/blob/master/concepts/concurrency.rst > Hi Kevin; Thanks for tracking this down. I did try some experiments a while ago with multi-threaded indexing (which is where the locking you mentioned arose), but overall it isn't well tested (by me). It seems reasonable to try to provide the same level of thread safety as Xapian does. So I guess we should go ahead and replace all of the MatchAll objects. I'm guessing this might apply to Xapian::Query::MatchNothing as well. Probably preprocessor macros wrapping Xapian::Query(std::string()) and whatever the equivalent for MatchNothing is would make this easier to read. d _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-leave@notmuchmail.org