Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Async/Async.h |
Include |
#include "Async/Async.h" |
template<typename CallableType>
auto AsyncThread
(
CallableType && Callable,
uint32 StackSize,
EThreadPriority ThreadPri,
TUniqueFunction< void()> CompletionCallback
)
Execute a given function asynchronously using a separate thread.
A TFuture object that will receive the return value from the function.
Parameter |
Description |
---|---|
CallableType |
The type of callable object. |
Function |
The function to execute. |
StackSize |
stack space to allocate for the new thread |
ThreadPri |
thread priority |
CompletionCallback |
An optional callback function that is executed when the function completed execution. |