26#include <seastar/core/coroutine.hh>
28namespace seastar::coroutine {
32struct maybe_yield_awaiter final {
33 bool await_ready()
const {
34 return !need_preempt();
38 void await_suspend(std::coroutine_handle<T> h) {
39 schedule(&h.promise());
72 auto operator co_await() {
return internal::maybe_yield_awaiter(); }
Definition: maybe_yield.hh:70