|
| Poll ()=delete |
| Basic constructors.
|
|
constexpr | Poll (const Poll &)=default |
|
constexpr Poll & | operator= (const Poll &)=default |
|
constexpr | Poll (Poll &&)=default |
|
constexpr Poll & | operator= (Poll &&)=default |
|
template<typename U , internal_poll::EnableIfImplicitlyConvertible< T, const U & > = 0> |
constexpr | Poll (const Poll< U > &other) |
|
template<typename U , internal_poll::EnableIfExplicitlyConvertible< T, const U & > = 0> |
constexpr | Poll (const Poll< U > &other) |
|
template<typename U , internal_poll::EnableIfImplicitlyConvertible< T, U && > = 0> |
constexpr | Poll (Poll< U > &&other) |
|
template<typename U , internal_poll::EnableIfExplicitlyConvertible< T, U && > = 0> |
constexpr | Poll (Poll< U > &&other) |
|
template<typename U = T, internal_poll::EnableIfImplicitlyInitializable< T, U > = 0> |
constexpr | Poll (U &&u) |
|
template<typename U = T, internal_poll::EnableIfExplicitlyInitializable< T, U > = 0> |
constexpr | Poll (U &&u) |
|
template<typename... Args> |
constexpr | Poll (std::in_place_t, Args &&... args) |
|
constexpr | Poll (T &&value) |
|
constexpr Poll & | operator= (T &&value) |
|
constexpr | Poll (PendingType) noexcept |
|
constexpr Poll & | operator= (PendingType) noexcept |
|
constexpr bool | IsReady () const noexcept |
| Returns whether or not this value is Ready .
|
|
constexpr bool | IsPending () const noexcept |
| Returns whether or not this value is Pending .
|
|
constexpr Poll | Readiness () const noexcept |
|
constexpr T & | value () &noexcept |
|
constexpr const T & | value () const &noexcept |
|
constexpr T && | value () &&noexcept |
|
constexpr const T && | value () const &&noexcept |
|
constexpr const T * | operator-> () const noexcept |
|
constexpr T * | operator-> () noexcept |
|
constexpr const T & | operator* () const &noexcept |
|
constexpr T & | operator* () &noexcept |
|
constexpr const T && | operator* () const &&noexcept |
|
constexpr T && | operator* () &&noexcept |
|
constexpr void | IgnorePoll () const |
|
template<typename T = ReadyType>
class pw::async2::Poll< T >
A value that may or may not be ready yet.
Poll<T>
most commonly appears as the return type of an function that checks the current status of an asynchronous operation. If the operation has completed, it returns with Ready(value)
. Otherwise, it returns Pending
to indicate that the operations has not yet completed, and the caller should try again in the future.
Poll<T>
itself is "plain old data" and does not change on its own. To check the current status of an operation, the caller must invoke the Poll<T>
returning function again and examine the newly returned Poll<T>
.
template<typename T = ReadyType>
template<typename U , internal_poll::EnableIfImplicitlyConvertible< T, const U & > = 0>
Constructs a new Poll<T>
from a Poll<U>
where T
is constructible from U
.
To avoid ambiguity, this constructor is disabled if T
is also constructible from Poll<U>
.
This constructor is explicit if and only if the corresponding construction of T
from U
is explicit.