QXmpp Version: 1.5.6
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QXmppPromise< T > Class Template Reference

Create and update QXmppTask objects to communicate results of asynchronous operations. More...

#include <QXmppPromise.h>

Public Member Functions

void reportFinished (T &&value)
 
QXmppTask< T > task ()
 

Detailed Description

template<typename T>
class QXmppPromise< T >

Create and update QXmppTask objects to communicate results of asynchronous operations.

Unlike QFuture, this is not thread-safe. This avoids the need to do mutex locking at every access though.

Since
QXmpp 1.5

Member Function Documentation

◆ reportFinished()

template<typename T >
void QXmppPromise< T >::reportFinished ( T &&  value)
inline

Report that the asynchronous operation has finished, and call the connected handler of the QXmppTask<T> belonging to this promise.

Parameters
valueThe result of the asynchronous computation

◆ task()

template<typename T >
QXmppTask< T > QXmppPromise< T >::task ( )
inline

Obtain a handle to this promise that allows to obtain the value that will be produced asynchronously.


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