30#include "ipc_runtime/ipc_server.hpp"
38#include <unordered_map>
43class WsdbScheduler :
public std::enable_shared_from_this<WsdbScheduler> {
53 void submit_read(uint64_t fork,
bool committed, std::function<
void()> work)
85 std::function<void()>
work;
108 auto self = shared_from_this();
120 while (!lane.
pending.empty()) {
145 auto self = shared_from_this();
148 self->complete(fork, mutating);
void enqueue(const std::function< void()> &task)
Abstract interface for IPC server.
WsdbScheduler(bb::ThreadPool &pool, ipc::IpcServer &server)
std::unordered_map< uint64_t, Lane > lanes_
void pump(uint64_t fork, Lane &lane)
void complete(uint64_t fork, bool mutating)
void submit_write(uint64_t fork, std::function< void()> work)
bool run_inline_if_idle(std::function< void()> &work)
void submit_read(uint64_t fork, bool committed, std::function< void()> work)
void dispatch(uint64_t fork, Lane &lane, bool mutating)
std::atomic< int > inflight_
void dispatch_unordered(std::function< void()> work)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::function< void()> work