24 #ifndef SEASTAR_MODULE
26 #include <seastar/core/task.hh>
27 #include <seastar/core/future.hh>
28 #include <seastar/util/modules.hh>
33 SEASTAR_MODULE_EXPORT_BEGIN
35 template <
typename 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 {
53 template <
typename Func>
56 make_task(Func&& func) noexcept {
60 template <
typename Func>
63 make_task(scheduling_group sg, Func&& func) noexcept {
64 return new lambda_task<Func>(sg, std::forward<Func>(func));
67 SEASTAR_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:286
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:400
Converts a type to a future type, if it isn't already.
Definition: future.hh:1843
static type invoke(Func &&func, FuncArgs &&... args) noexcept