Zth (libzth)
Loading...
Searching...
No Matches
zth::fiber_future< T > Struct Template Reference

The future returned by a fiber. More...

#include <async.h>

Inheritance diagram for zth::fiber_future< T >:
zth::SharedReference< T > zth::SharedReferenceOps< SharedReference< T >, T >

Public Types

typedef impl::fiber_future_helper< T >::type future_type
 
typedef future_type base
 
typedef future_type::type return_type
 
- Public Types inherited from zth::SharedReference< T >
typedef SharedPointer< T > SharedPointer_type
 
typedef SharedPointer_type::type type
 

Public Member Functions

template<typename F >
 fiber_future (F &f) noexcept
 
template<typename F >
 fiber_future (F const &f) noexcept
 
- Public Member Functions inherited from zth::SharedReference< T >
constexpr SharedReference () noexcept
 
constexpr SharedReference (type &object) noexcept
 
constexpr SharedReference (SharedReference const &p) noexcept
 
constexpr SharedReference (SharedPointer_type const &p) noexcept
 
 ~SharedReference () noexcept=default
 
void reset ()
 
SharedReferenceoperator= (SharedReference const &p) noexcept
 
constexpr SharedReference (SharedPointer_type &&p) noexcept
 
constexpr SharedReference (SharedReference &&p) noexcept
 
constexpr SharedReferenceoperator= (SharedReference &&p) noexcept
 
constexpr operator SharedPointer< type > () &&noexcept
 
constexpr operator SharedPointer_type () &noexcept
 
constexpr bool valid () const noexcept
 
- Public Member Functions inherited from zth::SharedReferenceOps< SharedReference< T >, T >
constexpr T & get () const noexcept
 
constexpr operator T& () const noexcept
 

Additional Inherited Members

- Public Attributes inherited from zth::SharedReferenceOps< SharedReference< T >, T >
constexpr decltype(**static_cast< T * >(nullptr) operator* )() const
 
constexpr decltype(static_cast< T * >(nullptr) ->operator->()) operator-> () const noexcept
 

Detailed Description

template<typename T = void>
struct zth::fiber_future< T >

The future returned by a fiber.

When a fiber, created with zth::fiber() or zth::factory(), is passed to this class, a future is automatically assigned to the fiber result.

See also
zth::asFuture
Examples
2_fibers.cpp, and 3_coop.cpp.

Definition at line 1292 of file async.h.

Member Typedef Documentation

◆ base

template<typename T = void>
typedef future_type zth::fiber_future< T >::base

Definition at line 1294 of file async.h.

◆ future_type

template<typename T = void>
typedef impl::fiber_future_helper<T>::type zth::fiber_future< T >::future_type

Definition at line 1293 of file async.h.

◆ return_type

template<typename T = void>
typedef future_type::type zth::fiber_future< T >::return_type

Definition at line 1295 of file async.h.

Constructor & Destructor Documentation

◆ fiber_future() [1/2]

template<typename T = void>
template<typename F >
zth::fiber_future< T >::fiber_future ( F &  f)
inlinenoexcept

Definition at line 1299 of file async.h.

◆ fiber_future() [2/2]

template<typename T = void>
template<typename F >
zth::fiber_future< T >::fiber_future ( F const &  f)
inlinenoexcept

Definition at line 1305 of file async.h.


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