2
0
mirror of https://github.com/boostorg/redis.git synced 2026-02-02 21:12:16 +00:00
Files
redis/include/aedis/resp3/impl/write.ipp
Marcelo Zimbres 05aff2f3c6 Refactoring listed below:
- Improvements in the organization.
- Adds support for the default token on the consumer.
2021-10-10 15:26:06 +02:00

30 lines
597 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/resp3/write.hpp>
namespace aedis {
namespace resp3 {
bool prepare_next(std::queue<request>& reqs)
{
if (std::empty(reqs)) {
reqs.push({});
return true;
}
if (reqs.back().sent) {
reqs.push({});
return false;
}
return false;
}
} // resp3
} // aedis