diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2024-05-27 23:02:42 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2024-06-03 21:01:17 +0300 |
| commit | 697d6b6b4fe922af17a7535f25497798d925b68f (patch) | |
| tree | f2336454d079c33fee389f164ec1e274e6e19596 /mu | |
| parent | f2f01595a51380ae38aafb4cd11a0d3c17a33a10 (diff) | |
server: pass sexp-commmands through store worker
To ensure all Xapian rw commands happen in the same thread.
Diffstat (limited to 'mu')
| -rw-r--r-- | mu/mu-cmd-server.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mu/mu-cmd-server.cc b/mu/mu-cmd-server.cc index 3a69456..50c7c01 100644 --- a/mu/mu-cmd-server.cc +++ b/mu/mu-cmd-server.cc @@ -79,11 +79,12 @@ cookie(size_t n) ::printf(COOKIE_PRE "%x" COOKIE_POST, num); } - - static void output_stdout(const std::string& str, Server::OutputFlags flags) { + // Note: with the StoreWorker, we _always_ need to flush + flags |= Server::OutputFlags::Flush; + cookie(str.size() + 1); if (G_UNLIKELY(::puts(str.c_str()) < 0)) { mu_critical("failed to write output '{}'", str); |
