25#include <seastar/core/task.hh>
26#include <seastar/core/future.hh>
27#include <seastar/util/modules.hh>
32SEASTAR_MODULE_EXPORT_BEGIN
34template <
typename Func>
35requires std::invocable<Func>
39 typename futurator::promise_type _result;
43 typename futurator::type get_future()
noexcept {
return _result.get_future(); }
44 virtual void run_and_dispose()
noexcept override {
53template <
typename Func>
54requires std::invocable<Func>
57make_task(Func&& func)
noexcept {
61template <
typename Func>
62requires std::invocable<Func>
65make_task(scheduling_group sg, Func&& func)
noexcept {
66 return new lambda_task<Func>(sg, std::forward<Func>(func));
69SEASTAR_MODULE_EXPORT_END
Definition: make_task.hh:36
virtual task * waiting_task() noexcept override
Returns the next task which is waiting for this task to complete execution, or nullptr.
Definition: make_task.hh:48
Identifies function calls that are accounted as a group.
Definition: scheduling.hh:369
virtual task * waiting_task() noexcept=0
Returns the next task which is waiting for this task to complete execution, or nullptr.
Seastar API namespace.
Definition: abort_on_ebadf.hh:26
scheduling_group current_scheduling_group() noexcept
Returns the current scheduling group.
Definition: scheduling.hh:481
Converts a type to a future type, if it isn't already.
Definition: future.hh:1830
static type invoke(Func &&func, FuncArgs &&... args) noexcept