server: support flushing the output

So we can get some progress output
This commit is contained in:
Dirk-Jan C. Binnema
2022-02-03 22:58:53 +02:00
parent 05393ba797
commit b6d7d142f6
3 changed files with 14 additions and 8 deletions

View File

@ -78,12 +78,15 @@ struct Server::Private {
//
// output
//
void output_sexp(Sexp&& sexp) const
void output_sexp(Sexp&& sexp, bool flush = false) const
{
if (output_)
output_(std::move(sexp));
output_(std::move(sexp), flush);
}
void output_sexp(Sexp::List&& lst, bool flush = false) const
{
output_sexp(Sexp::make_list(std::move(lst)), flush);
}
void output_sexp(Sexp::List&& lst) const { output_sexp(Sexp::make_list(std::move(lst))); }
size_t output_results(const QueryResults& qres, size_t batch_size) const;
//