ORIGINAL
Loading...
Searching...
No Matches
original::async::promise< void, Callback > Class Template Reference

Specialization of promise for void results. More...

#include <async.h>

Collaboration diagram for original::async::promise< void, Callback >:
Collaboration graph

Public Member Functions

 promise (Callback &&c)
 Constructs a promise with a computation callback.
 
future< void > getFuture () const
 Gets the future associated with this promise.
 
void run ()
 Executes the computation and marks completion.
 

Detailed Description

template<typename Callback>
class original::async::promise< void, Callback >

Specialization of promise for void results.

Template Parameters
CallbackThe type of the computation callback

Constructor & Destructor Documentation

◆ promise()

template<typename Callback >
original::async::promise< void, Callback >::promise ( Callback && c)
explicit

Constructs a promise with a computation callback.

Parameters
cCallback that will execute the computation

Member Function Documentation

◆ getFuture()

template<typename Callback >
original::async::future< void > original::async::promise< void, Callback >::getFuture ( ) const
nodiscard

Gets the future associated with this promise.

Returns
A future that will receive the completion signal

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