24#include <seastar/core/chunked_fifo.hh>
25#include <seastar/core/internal/io_request.hh>
40class pending_io_request :
private internal::io_request {
42 io_completion* _completion;
45 pending_io_request(internal::io_request req, io_completion* desc) noexcept
46 : io_request(std::move(req))
52 chunked_fifo<pending_io_request> _pending_io;
54 void submit(io_completion* desc, internal::io_request req)
noexcept;
56 template <
typename Fn>
59 requires std::is_invocable_r<bool, Fn, internal::io_request&, io_completion*>::value
60 size_t drain(Fn&& consume) {
63 for (
auto& req : _pending_io) {
64 if (!consume(req, req._completion)) {
70 _pending_io.pop_front_n(drained);
Seastar API namespace.
Definition: abort_on_ebadf.hh:26