22 #include <experimental/coroutine> 50 template <
typename Promise>
52 std::experimental::coroutine_handle<Promise>
h)
noexcept {
78 std::experimental::coroutine_handle<> continuation)
noexcept {
92 "InlineTask<T> only supports types that are move-constructible.");
95 "InlineTask<T&&> is not supported");
108 result_.emplace(static_cast<Value&&>(value));
114 std::is_nothrow_move_constructible<
T>::
value) {
115 result_.emplace(static_cast<T&&>(value));
119 result_.emplaceException(
132 std::reference_wrapper<std::remove_reference_t<T>>,
148 result_.emplaceException(
153 return result_.value();
160 template <
typename T>
166 using handle_t = std::experimental::coroutine_handle<promise_type>;
191 std::experimental::coroutine_handle<> awaitingCoroutine)
noexcept {
192 assert(coro_ && !coro_.done());
193 coro_.promise().set_continuation(awaitingCoroutine);
200 return coro_.promise().result();
210 assert(coro_ && !coro_.done());
220 template <
typename T>
223 std::experimental::coroutine_handle<InlineTaskPromise<T>>::from_promise(
bool await_ready() noexcept
InlineTaskPromiseBase() noexcept=default
InlineTask(handle_t coro) noexcept
auto final_suspend() noexcept
handle_t await_suspend(std::experimental::coroutine_handle<> awaitingCoroutine) noexcept
constexpr detail::Map< Move > move
std::experimental::coroutine_handle await_suspend(std::experimental::coroutine_handle< Promise > h) noexcept
Awaiter(handle_t coro) noexcept
static exception_wrapper from_exception_ptr(std::exception_ptr const &eptr) noexcept
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
std::experimental::coroutine_handle continuation_
void set_continuation(std::experimental::coroutine_handle<> continuation) noexcept
folly::Try< StorageType > result_
void unhandled_exception() noexcept
InlineTask(InlineTask &&other) noexcept
bool Value(const T &value, M matcher)
InlineTask< T > get_return_object() noexcept
std::experimental::coroutine_handle< promise_type > handle_t
static const char *const value
void unhandled_exception() noexcept
std::conditional_t< std::is_lvalue_reference< T >::value, std::reference_wrapper< std::remove_reference_t< T >>, T > StorageType
FOLLY_NODISCARD detail::ScopeGuardImplDecay< F, true > makeGuard(F &&f) noexcept(noexcept(detail::ScopeGuardImplDecay< F, true >(static_cast< F && >(f))))
bool await_ready() noexcept
T exchange(T &obj, U &&new_value)
folly::Try< void > result_
void return_value(Value &&value) noexcept(std::is_nothrow_constructible< T, Value && >::value)
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
InlineTaskPromiseBase & operator=(const InlineTaskPromiseBase &)=delete
void return_value(T &&value) noexcept(std::is_nothrow_move_constructible< T >::value)
void await_resume() noexcept
std::experimental::suspend_always initial_suspend() noexcept
void return_void() noexcept