Skip to content

Commit

Permalink
Remove unused detail func makeBlockingWaitTask
Browse files Browse the repository at this point in the history
Reviewed By: iahs

Differential Revision: D67889890

fbshipit-source-id: 832b1cf80b3c4d8c236b9c873d1a5743c96c5a44
  • Loading branch information
Alexey Spiridonov authored and facebook-github-bot committed Jan 8, 2025
1 parent a680bb0 commit b7954d2
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions folly/coro/BlockingWait.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,6 @@ class BlockingWaitPromise<T&> final : public BlockingWaitPromiseBase {
return final_suspend();
}

#if 0
void return_value(T& value) noexcept {
result_->emplace(std::ref(value));
}
#endif

void return_void() {
// This should never be reachable.
// The coroutine should either have suspended at co_yield or should have
Expand Down Expand Up @@ -259,24 +253,6 @@ BlockingWaitPromise<void>::get_return_object() noexcept {
coroutine_handle<BlockingWaitPromise<void>>::from_promise(*this)};
}

template <
typename Awaitable,
typename Result = await_result_t<Awaitable>,
std::enable_if_t<!std::is_lvalue_reference<Result>::value, int> = 0>
auto makeBlockingWaitTask(Awaitable&& awaitable)
-> BlockingWaitTask<detail::decay_rvalue_reference_t<Result>> {
co_return co_await static_cast<Awaitable&&>(awaitable);
}

template <
typename Awaitable,
typename Result = await_result_t<Awaitable>,
std::enable_if_t<std::is_lvalue_reference<Result>::value, int> = 0>
auto makeBlockingWaitTask(Awaitable&& awaitable)
-> BlockingWaitTask<detail::decay_rvalue_reference_t<Result>> {
co_yield co_await static_cast<Awaitable&&>(awaitable);
}

template <
typename Awaitable,
typename Result = await_result_t<Awaitable>,
Expand Down

0 comments on commit b7954d2

Please sign in to comment.