swift
Public Member Functions | List of all members
swift::misc::CPromise< void > Class Reference

Specialization of CPromise for void futures. More...

Public Member Functions

QFuture< void > future ()
 Return a future that can be used to detect when the task is complete.
 
void abandon ()
 Mark the task as cancelled.
 
void setResult ()
 Mark the task as complete.
 
template<typename U >
void setResult (QFuture< U > future)
 Wait for the given future, then mark the task as complete.
 
template<typename U >
void chainResult (QFuture< U > future)
 When the given future is ready, mark this promise as complete.
 
template<typename F >
void setResultFrom (F &&func)
 Invoke a functor and mark the task as complete. More...
 

Detailed Description

Specialization of CPromise for void futures.

Definition at line 124 of file promise.h.

Member Function Documentation

◆ setResultFrom()

template<typename F >
void swift::misc::CPromise< void >::setResultFrom ( F &&  func)
inline

Invoke a functor and mark the task as complete.

Useful for uniform syntax in generic code where T could be void.

Definition at line 158 of file promise.h.


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