dpp::basic_awaitable
awaitable.h
typename Derived
bool Timed Timed
auto auto dpp::basic_awaitable< Derived >::sync_wait_impl (auto &&do_wait) sync_wait_impl dpp::basic_awaitable::sync_wait_impl auto && do_wait

Implementation for sync_wait. This is code used by sync_wait, sync_wait_for, sync_wait_until.

Timed

Whether the wait function times out or not

do_wait

Function to do the actual wait on the cv

If T is void, returns a boolean for which true means the awaitable completed, false means it timed out.

If T is non-void, returns a std::optional<T> for which an absence of value means timed out.

auto auto dpp::basic_awaitable< Derived >::sync_wait () sync_wait dpp::basic_awaitable::sync_wait

Blocks this thread and waits for the awaitable to finish.

This will BLOCK THE THREAD. It is likely you want to use co_await instead.

If T is void, returns a boolean for which true means the awaitable completed, false means it timed out.

If T is non-void, returns a std::optional<T> for which an absence of value means timed out.

class Rep
class Period
auto auto dpp::basic_awaitable< Derived >::sync_wait_for (const std::chrono::duration< Rep, Period > &duration) sync_wait_for dpp::basic_awaitable::sync_wait_for const std::chrono::duration< Rep, Period > & duration

Blocks this thread and waits for the awaitable to finish.

This will BLOCK THE THREAD. It is likely you want to use co_await instead.

duration

Maximum duration to wait for

If T is void, returns a boolean for which true means the awaitable completed, false means it timed out.

If T is non-void, returns a std::optional<T> for which an absence of value means timed out.

class Clock
class Duration
auto auto dpp::basic_awaitable< Derived >::sync_wait_until (const std::chrono::time_point< Clock, Duration > &time) sync_wait_until dpp::basic_awaitable::sync_wait_until const std::chrono::time_point< Clock, Duration > & time

Blocks this thread and waits for the awaitable to finish.

This will BLOCK THE THREAD. It is likely you want to use co_await instead.

time

Maximum time point to wait for

If T is void, returns a boolean for which true means the awaitable completed, false means it timed out.

If T is non-void, returns a std::optional<T> for which an absence of value means timed out.

dpp::async< R >
dpp::awaitable< T >
dpp::awaitable< R >
< R >
dpp::basic_awaitable< Derived >
dpp::basic_awaitable< awaitable< R > >
< awaitable< R > >
dpp::basic_awaitable< awaitable< T > >
< awaitable< T > >
dpp::basic_awaitable< coroutine< R > >
< coroutine< R > >
dpp::coroutine< R >
dpp::task< R >
- dpp::basic_awaitable
  sync_wait
- dpp::basic_awaitable
  sync_wait_for
- dpp::basic_awaitable
  sync_wait_impl
- dpp::basic_awaitable
  sync_wait_until