8template <
typename V,
typename E,
typename Func>
11 if constexpr (std::is_same_v<V, Unit>) {
19 using ResultCoreT =
typename std::remove_reference_t<
decltype(*core)>::Base;
31template <
typename E = StopError,
typename Func>
33 return detail::Schedule<Unit, E>(
MakeInline(), std::forward<Func>(
f));
43template <
typename E = StopError,
typename Func>
46 "better way is call func explicit and use MakeTask to create Task with func result"
47 " or at least use Schedule(func)");
48 return detail::Schedule<Unit, E>(
e, std::forward<Func>(
f));
57template <
typename V =
void,
typename E = StopError,
typename Func>
59 return detail::Schedule<V, E>(
MakeInline(), std::forward<Func>(
f)).On(
nullptr);
69template <
typename V =
void,
typename E = StopError,
typename Func>
72 return detail::Schedule<V, E>(
e, std::forward<Func>(
f));
A intrusive pointer to objects with an embedded reference count.
Provides a mechanism to schedule the some async operations TODO(MBkkt) add description.
#define YACLIB_WARN(cond, message)
YACLIB_INLINE auto Schedule(IExecutor &e, Func &&f)
auto LazyContract(Func &&f)
Execute Callable func on Inline executor.
auto Schedule(Func &&f)
Execute Callable func on Inline executor.
IExecutor & MakeInline() noexcept
Get Inline executor singleton object.
Contract< V, E > MakeContract()
Creates related future and promise.