Navigation
API > API/Runtime > API/Runtime/Core
Description
Blocks the current thread until any of the given tasks is completed. Is slightly more efficient than AnyTaskCompleted()->Wait()_ and supports timeout while FGraphEvent::Wait() doesn't. Returns the index of the first completed task, or `INDEX_NONE on timeout.
| Name | WaitForAnyTaskCompleted |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Async/TaskGraphInterfaces.h |
| Include Path | #include "Async/TaskGraphInterfaces.h" |
| Source | /Engine/Source/Runtime/Core/Private/Async/TaskGraph.cpp |
int32 WaitForAnyTaskCompleted
(
const FGraphEventArray & GraphEvents,
FTimespan Timeout
)