OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::msgbus::pending_promises< T > Class Template Reference

Class that makes new and tracks existing pending message bus promises. More...

#include <eagine/message_bus/future.hpp>

Public Member Functions

auto make () -> std::tuple< message_sequence_t, future< T >>
 Constructs and returns a new message bus future and its unique id. More...
 
void fulfill (message_sequence_t id, T value)
 Fulfills the promise/future pair idenified by id with the given value.
 
auto update () -> bool
 Update the internal state of this promise/future tracker.
 
auto has_some () const noexcept -> bool
 Indicates if there are any unfulfilled pending promises. More...
 
auto has_none () const noexcept -> bool
 Indicates if there are no pending promises. More...
 

Detailed Description

template<typename T>
class eagine::msgbus::pending_promises< T >

Class that makes new and tracks existing pending message bus promises.

See also
promise
future

Member Function Documentation

◆ has_none()

template<typename T >
auto eagine::msgbus::pending_promises< T >::has_none ( ) const -> bool
inlinenoexcept

Indicates if there are no pending promises.

See also
has_some

◆ has_some()

template<typename T >
auto eagine::msgbus::pending_promises< T >::has_some ( ) const -> bool
inlinenoexcept

Indicates if there are any unfulfilled pending promises.

See also
has_none

◆ make()

template<typename T >
auto eagine::msgbus::pending_promises< T >::make ( ) -> std::tuple<message_sequence_t, future<T>>
inline

Constructs and returns a new message bus future and its unique id.

The returned future can be used to retrieve the promise.


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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).