Standard pw_async2 future states. Used by FutureCore and may be used by custom future implementations.
|
| enum | Pending { kPending
} |
| | Tag for constructing an active future, for which Pend may be called.
|
| |
| enum | ReadyForCompletion { kReadyForCompletion
} |
| |
◆ ReadyForCompletion
Tag for constructing a future that is guaranteed to return Ready from the next Pend call.
◆ FutureState() [1/3]
| constexpr pw::async2::FutureState::FutureState |
( |
| ) |
|
|
inlineconstexpr |
Represents an empty future. The future does not yet represent an asynchronous operation and Pend may not be called.
◆ FutureState() [2/3]
Represents a future that is guaranteed to return Ready from the next Pend call. Use of the ReadyForCompletion" state is optional---future implementations may skip fromPendingtoComplete` if desired.
◆ FutureState() [3/3]
| constexpr pw::async2::FutureState::FutureState |
( |
FutureState && |
other | ) |
|
|
inlineconstexpr |
Move constructs a FutureState, leaving the other in its default constructed / empty state.
◆ is_complete()
| constexpr bool pw::async2::FutureState::is_complete |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
- Whether the future has completed: the future's
Pend() returned Ready.
◆ is_initialized()
| constexpr bool pw::async2::FutureState::is_initialized |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
true if the future was NOT default constructed. The future either represents an active or completed asynchronous operation.
◆ is_pendable()
| constexpr bool pw::async2::FutureState::is_pendable |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
- Whether the future's
Pend() function can be called.
◆ is_ready()
| constexpr bool pw::async2::FutureState::is_ready |
( |
| ) |
const |
|
inlineconstexpr |
- Returns
true if the next Pend() call is guaranteed to return Ready. Not all future implementations use the ready state; Pend() may return Ready even though is_ready is false.
The documentation for this class was generated from the following file: