60template<
typename ResultType,
typename CallableType>
66template<
typename CallableType>
105template<
typename ResultType>
143 return DesiredThread;
153 return Promise.GetFuture();
172template<
typename ResultType>
213template<
typename ResultType>
298template<
typename CallableType>
333 check(RunnableThread !=
nullptr);
353 check(RunnableThread !=
nullptr);
377 case EAsyncExecution::LargeThreadPool:
406template<
typename CallableType>
429template<
typename CallableType>
445 check(RunnableThread !=
nullptr);
468template<
typename ResultType>
#define check(expr)
Definition AssertionMacros.h:314
EAsyncExecution
Definition Async.h:28
auto AsyncPool(FQueuedThreadPool &ThreadPool, CallableType &&Callable, TUniqueFunction< void()> CompletionCallback=nullptr, EQueuedWorkPriority InQueuedWorkPriority=EQueuedWorkPriority::Normal) -> TFuture< decltype(Forward< CallableType >(Callable)())>
Definition Async.h:407
CORE_API void AsyncTask(ENamedThreads::Type Thread, TUniqueFunction< void()> Function)
Definition Async.cpp:54
auto AsyncThread(CallableType &&Callable, uint32 StackSize=0, EThreadPriority ThreadPri=TPri_Normal, TUniqueFunction< void()> CompletionCallback=nullptr) -> TFuture< decltype(Forward< CallableType >(Callable)())>
Definition Async.h:430
void SetPromise(TPromise< ResultType > &Promise, CallableType &&Callable)
Definition Async.h:61
#define GET_STATID(Stat)
Definition Stats.h:656
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EQueuedWorkPriority
Definition QueuedThreadPool.h:14
FQueuedThreadPool * GThreadPool
Definition ThreadingBase.cpp:48
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
TStatId GetStatId() const
Definition Async.h:85
static ESubsequentsMode::Type GetSubsequentsMode()
Definition Async.h:95
static CORE_API FRunnableThread * CreateForkableThread(class FRunnable *InRunnable, const TCHAR *InThreadName, uint32 InStackSize=0, EThreadPriority InThreadPri=TPri_Normal, uint64 InThreadAffinityMask=FPlatformAffinity::GetNoAffinityMask(), EThreadCreateFlags InCreateFlags=EThreadCreateFlags::None, bool bAllowPreFork=false)
Definition ThreadingBase.cpp:1712
static CORE_API bool IsForkedMultithreadInstance()
Definition Fork.cpp:103
Definition QueuedThreadPool.h:105
virtual void AddQueuedWork(IQueuedWork *InQueuedWork, EQueuedWorkPriority InQueuedWorkPriority=EQueuedWorkPriority::Normal)=0
Definition RunnableThread.h:20
virtual FRunnableThread::ThreadType GetThreadType() const
Definition RunnableThread.h:103
static CORE_API FRunnableThread * Create(class FRunnable *InRunnable, const TCHAR *ThreadName, uint32 InStackSize=0, EThreadPriority InThreadPri=TPri_Normal, uint64 InThreadAffinityMask=FPlatformAffinity::GetNoAffinityMask(), EThreadCreateFlags InCreateFlags=EThreadCreateFlags::None)
Definition ThreadingBase.cpp:862
static CORE_API FTSTicker & GetCoreTicker()
Definition Ticker.cpp:8
CORE_API FDelegateHandle AddTicker(const FTickerDelegate &InDelegate, float InDelay=0.0f)
Definition Ticker.cpp:14
Definition IQueuedWork.h:62
void DoTask(ENamedThreads::Type CurrentThread, const FGraphEventRef &MyCompletionGraphEvent)
Definition Async.h:131
ENamedThreads::Type GetDesiredThread()
Definition Async.h:141
TAsyncGraphTask(TUniqueFunction< ResultType()> &&InFunction, TPromise< ResultType > &&InPromise, ENamedThreads::Type InDesiredThread=ENamedThreads::AnyThread)
Definition Async.h:117
TFuture< ResultType > GetFuture()
Definition Async.h:151
virtual void Abandon() override
Definition Async.h:240
TAsyncQueuedWork(TUniqueFunction< ResultType()> &&InFunction, TPromise< ResultType > &&InPromise)
Definition Async.h:225
virtual void DoThreadedWork() override
Definition Async.h:234
TAsyncRunnable(TUniqueFunction< ResultType()> &&InFunction, TPromise< ResultType > &&InPromise, TFuture< FRunnableThread * > &&InThreadFuture)
Definition Async.h:185
virtual uint32 Run() override
Definition Async.h:469
Definition TaskGraphInterfaces.h:598
TFuture< ResultType > GetFuture()
Definition Future.h:587
void SetValue(const SetType &Result)
Definition Future.h:603
Definition FunctionFwd.h:19
Type
Definition TaskGraphInterfaces.h:57
@ GameThread
Definition TaskGraphInterfaces.h:61
@ AnyThread
Definition TaskGraphInterfaces.h:67
Type
Definition TaskGraphInterfaces.h:249
@ FireAndForget
Definition TaskGraphInterfaces.h:253
static CORE_API int32 GetNext()
Definition Async.cpp:48
Definition LightweightStats.h:416