2
0
mirror of https://github.com/boostorg/redis.git synced 2026-02-10 11:42:28 +00:00
Files
redis/include/aedis/impl/write.ipp
Marcelo Zimbres 92e2a42419 More refactoring.
2021-08-29 22:26:11 +02:00

29 lines
565 B
C++

/* Copyright (c) 2019 - 2021 Marcelo Zimbres Silva (mzimbres at gmail dot com)
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include <aedis/write.hpp>
namespace aedis {
bool prepare_queue(std::queue<pipeline>& reqs)
{
if (std::empty(reqs)) {
reqs.push({});
return true;
}
if (reqs.back().sent) {
reqs.push({});
return false;
}
return false;
}
} // aedis