Language:
Discover
By Skill Level
By Category

TPromise

Choose your OS:

Inheritance Hierarchy

Syntax

template<typename ResultType>
class TPromise : public TPromiseBase< ResultType >

Remarks

Template for promises.

Specializations

Constructors

Name Description

Public function

TPromise()

Default constructor (creates a new shared state).

Public function

TPromise

(
    TPromise && Other
)

Move constructor.

Public function

TPromise

(
    TUniqueFunction < void()>&& Complet...
)

Create and initialize a new instance with a callback.

Functions

Name Description

Public function

TFuture < Res...

 

GetFuture()

Gets a TFuture object associated with the shared state of this promise.

Public function

void

 

SetValue

(
    const ResultType& Result
)

Sets the promised result.

Public function

void

 

SetValue

(
    ResultType&& Result
)

Sets the promised result (from rvalue).

Operators

Name Description

Public function

TPromise &

 

operator=

(
    TPromise && Other
)

Move assignment operator.

Typedefs

Name

Description

BaseType

References

Module

Core

Header

Runtime/Core/Public/Async/Future.h