engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
TFutureState< InternalResultType > 模板类 参考

Implements the internal state of asynchronous return values (futures). 更多...

#include <Future.h>

+ 类 TFutureState< InternalResultType > 继承关系图:

Public 成员函数

template<typename... ArgTypes>
void EmplaceResult (ArgTypes &&... Args)
 Sets the result and notifies any waiting threads. 更多...
 
const InternalResultType & GetResult () const
 Gets the result (will block the calling thread until the result is available). 更多...
 
 TFutureState ()
 Default constructor.
 
 TFutureState (TUniqueFunction< void()> &&CompletionCallback)
 Create and initialize a new instance with a callback. 更多...
 
- Public 成员函数 继承自 FFutureState
 FFutureState ()
 Default constructor.
 
 FFutureState (TUniqueFunction< void()> &&InCompletionCallback)
 Create and initialize a new instance with a callback. 更多...
 
bool IsComplete () const
 Checks whether the asynchronous result has been set. 更多...
 
void SetContinuation (TUniqueFunction< void()> &&Continuation)
 Set a continuation to be called on completion of the promise 更多...
 
bool WaitFor (const FTimespan &Duration) const
 Blocks the calling thread until the future result is available. 更多...
 
 ~FFutureState ()
 Destructor.
 

额外继承的成员函数

- Protected 成员函数 继承自 FFutureState
void MarkComplete ()
 Notifies any waiting threads that the result is available.
 

详细描述

template<typename InternalResultType>
class TFutureState< InternalResultType >

Implements the internal state of asynchronous return values (futures).

构造及析构函数说明

◆ TFutureState()

template<typename InternalResultType >
TFutureState< InternalResultType >::TFutureState ( TUniqueFunction< void()> &&  CompletionCallback)
inline

Create and initialize a new instance with a callback.

参数
CompletionCallbackA function that is called when the state is completed.

成员函数说明

◆ EmplaceResult()

template<typename InternalResultType >
template<typename... ArgTypes>
void TFutureState< InternalResultType >::EmplaceResult ( ArgTypes &&...  Args)
inline

Sets the result and notifies any waiting threads.

参数
InResultThe result to set.
参见
GetResult

◆ GetResult()

template<typename InternalResultType >
const InternalResultType & TFutureState< InternalResultType >::GetResult ( ) const
inline

Gets the result (will block the calling thread until the result is available).

返回
The result value.
参见
EmplaceResult

该类的文档由以下文件生成: