C/C++ API Reference
Loading...
Searching...
No Matches
pw::async2::ValueFuture< T > Class Template Reference

Overview

template<typename T>
class pw::async2::ValueFuture< T >

A future that holds a single value.

A ValueFuture is a concrete Future implementation that is vended by a ValueProvider or a BroadcastValueProvider. It waits until the provider resolves it with a value.

Public Types

using value_type = T
 

Public Member Functions

 ValueFuture (ValueFuture &&other) noexcept
 
ValueFutureoperator= (ValueFuture &&other) noexcept
 
Poll< T > Pend (Context &cx)
 
bool is_complete () const
 

Static Public Member Functions

template<typename... Args>
static ValueFuture Resolved (Args &&... args)
 

Friends

class FutureCore
 
class ValueProvider< T >
 
class BroadcastValueProvider< T >
 

Member Function Documentation

◆ Resolved()

template<typename T >
template<typename... Args>
static ValueFuture pw::async2::ValueFuture< T >::Resolved ( Args &&...  args)
inlinestatic

Creates a ValueFuture that is already resolved by constructing its value in-place.


The documentation for this class was generated from the following file: