updated build system

This commit is contained in:
2024-08-23 09:34:41 -05:00
parent bc85e34310
commit 4eff7aae64
19 changed files with 198 additions and 226 deletions

View File

@ -33,6 +33,8 @@ struct result final {
[[nodiscard]] operator bool() const { return ok; }
};
using retryable_action_t = std::function<bool()>;
[[nodiscard]] inline constexpr auto
calculate_read_size(std::uint64_t total_size, std::size_t read_size,
std::uint64_t offset) -> std::size_t {
@ -90,6 +92,11 @@ get_next_available_port(std::uint16_t first_port,
std::uint16_t &available_port) -> bool;
#endif // defined(PROJECT_ENABLE_BOOST)
[[nodiscard]] auto retry_action(retryable_action_t action,
std::size_t retry_count = 200U,
std::chrono::milliseconds retry_wait =
std::chrono::milliseconds(10)) -> bool;
template <typename result_t, typename data_t>
inline constexpr auto divide_with_ceiling(result_t numerator,
data_t denominator) -> result_t {