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

Template for asynchronous functions that are executed in a separate thread. 更多...

#include <Async.h>

+ 类 TAsyncRunnable< ResultType > 继承关系图:

Public 成员函数

virtual uint32 Run () override
 Runs the runnable object. 更多...
 
 TAsyncRunnable (TUniqueFunction< ResultType()> &&InFunction, TPromise< ResultType > &&InPromise, TFuture< FRunnableThread * > &&InThreadFuture)
 Creates and initializes a new instance. 更多...
 
- Public 成员函数 继承自 FRunnable
virtual void Exit ()
 Exits the runnable object. 更多...
 
virtual class FSingleThreadRunnable * GetSingleThreadInterface ()
 Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled. 更多...
 
virtual bool Init ()
 Initializes the runnable object. 更多...
 
virtual uint32 Run ()=0
 Runs the runnable object. 更多...
 
virtual void Stop ()
 Stops the runnable object. 更多...
 
virtual ~FRunnable ()
 Virtual destructor
 

详细描述

template<typename ResultType>
class TAsyncRunnable< ResultType >

Template for asynchronous functions that are executed in a separate thread.

构造及析构函数说明

◆ TAsyncRunnable()

template<typename ResultType >
TAsyncRunnable< ResultType >::TAsyncRunnable ( TUniqueFunction< ResultType()> &&  InFunction,
TPromise< ResultType > &&  InPromise,
TFuture< FRunnableThread * > &&  InThreadFuture 
)
inline

Creates and initializes a new instance.

参数
InFunctionThe function to execute asynchronously.
InPromiseThe promise object used to return the function's result.
InThreadFutureThe thread that is running this task.

成员函数说明

◆ Run()

template<typename ResultType >
uint32 TAsyncRunnable< ResultType >::Run ( )
overridevirtual

Runs the runnable object.

This is where all per object thread work is done. This is only called if the initialization was successful.

返回
The exit code of the runnable object
参见
Init, Stop, Exit

实现了 FRunnable.


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