20#ifndef RIPPLE_APP_MISC_DETAIL_WORKFILE_H_INCLUDED
21#define RIPPLE_APP_MISC_DETAIL_WORKFILE_H_INCLUDED
23#include <xrpld/app/misc/detail/Work.h>
24#include <xrpl/basics/ByteUtilities.h>
25#include <xrpl/basics/FileUtilities.h>
26#include <xrpl/beast/utility/instrumentation.h>
47 boost::asio::io_service& ios,
60 boost::asio::io_service&
ios_;
68 boost::asio::io_service& ios,
70 : path_(path), cb_(
std::move(cb)), ios_(ios), strand_(ios)
83 if (!
strand_.running_in_this_thread())
90 XRPL_ASSERT(
cb_,
"ripple::detail::WorkFile::run : callback is set");
91 cb_(ec, fileContents);
boost::asio::io_service & ios_
boost::system::error_code error_code
WorkFile(std::string const &path, boost::asio::io_service &ios, callback_type cb)
boost::asio::io_service::strand strand_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr auto megabytes(T value) noexcept
std::error_code make_error_code(ripple::TokenCodecErrc e)
std::string getFileContents(boost::system::error_code &ec, boost::filesystem::path const &sourcePath, std::optional< std::size_t > maxSize=std::nullopt)
T shared_from_this(T... args)