mirror of https://github.com/djcb/mu.git
store: don't lock for_each_term
It's only called from the parser with a store, and when we _already_ hold the lock.
This commit is contained in:
parent
6becc657c1
commit
77bca5463f
|
@ -610,8 +610,10 @@ Store::for_each_term(const std::string& field, Store::ForEachTermFunc func) cons
|
|||
size_t n{};
|
||||
|
||||
xapian_try([&] {
|
||||
std::lock_guard guard{priv_->lock_};
|
||||
const auto id = field_id(field.c_str());
|
||||
/*
|
||||
* Do _not_ take a lock; this is only called from
|
||||
* the message parser which already has the lock */
|
||||
const auto id = field_id(field.c_str());
|
||||
if (id == MU_MSG_FIELD_ID_NONE)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue