8template <
typename V,
typename E,
typename Func>
11 if constexpr (std::is_same_v<V, Unit>) {
20 using ResultCoreT =
typename std::remove_reference_t<
decltype(*core)>::Base;
32template <
typename E = StopError,
typename Func>
34 return detail::Schedule<Unit, E>(
MakeInline(), std::forward<Func>(
f));
44template <
typename E = StopError,
typename Func>
47 "better way is call func explicit and use MakeTask to create Task with func result"
48 " or at least use Schedule(func)");
49 return detail::Schedule<Unit, E>(
e, std::forward<Func>(
f));
58template <
typename V =
void,
typename E = StopError,
typename Func>
60 return detail::Schedule<V, E>(
MakeInline(), std::forward<Func>(
f)).On(
nullptr);
70template <
typename V =
void,
typename E = StopError,
typename Func>
73 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)
std::conditional_t< IsDetach(Type), NoResultCore, std::conditional_t< IsToShared(Type), SharedCore< V, E >, UniqueCore< V, E > > > ResultCoreT
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.