Skip to content
AI & Agents
Skill

/ue-async-threading

Use when offloading work off the game thread, dispatching results back to it, running data-parallel loops, or scheduling timers and tickers in UE C++. Also use when the user mentions 'UE::Tasks::Launch', 'FPipe', 'FTaskEvent', 'AsyncTask', 'Async()', 'TFuture', 'TPromise',

From plugin
unreal-engine-skills
46831 skills

Claude Code

$ npx -y skills add quodsoler/unreal-engine-skills --skill ue-async-threading --agent claude-code

SKILL.md

ue-async-threading.SKILL.md
name: ue-async-threading
description: "Use when offloading work off the game thread, dispatching results back to it, running data-parallel loops, or scheduling timers and tickers in UE C++. Also use when the user mentions 'UE::Tasks::Launch', 'FPipe', 'FTaskEvent', 'AsyncTask', 'Async()', 'TFuture', 'TPromise', 'ParallelFor', 'FRunnable', 'FAsyncTask', 'FCriticalSection', 'FRWLock', 'UE::FMutex', 'TMpscQueue', 'IsInGameThread', 'FTSTicker', 'SetTimer', 'thread safety'. For async asset loading, see ue-data-assets-tables; for smart pointers and GC lifetime, see ue-cpp-foundations."
metadata:
  version: "2.0.0"
  engine: "5.8"

UE Async and Threading

Target engine: **UE 5.8**. APIs below are verified against the 5.8 headers; older forms are listed under "Deprecated — do not use".

This skill covers moving work off the game thread and bringing results back: the `UE::Tasks` system (`Tasks/Task.h`, `Tasks/Pipe.h`), `Async`/`TFuture` (`Async/Async.h`, `Async/Future.h`), thread-pool `FAsyncTask` (`Async/AsyncWork.h`), `ParallelFor`, dedicated `FRunnable` threads, locks and lock-free queues, `FTSTicker` and `FTimerManager`. Everything except timers is in the `Core` module; `FTimerManager` is in `Engine`; `ENQUEUE_RENDER_COMMAND` is in `RenderCore`. Build.cs: `PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine" });` and add `"RenderCore"` only when enqueuing render commands.

Context

Read `.agents/ue-project-context.md` if it exists (module names, conventions, enabled plugins, GAS/networking setup). Do not stop if it is missing.

Identify the area from the request and the codebase. Ask only when two plausible readings would produce different code.

| Request is about… | Go to | |---|---| | Which API fits | [Pattern Selection](#pattern-selection) | | One-shot background work, chaining, prerequisites, events | [UE::Tasks](#uetasks) | | Serializing access to a resource without a dedicated thread | [FPipe and FTaskConcurrencyLimiter](#fpipe-and-ftaskconcurrencylimiter) | | Futures, promises, dispatch to the game thread | [Async, TFuture and AsyncTask](#async-tfuture-and-asynctask) | | Reusable pooled work unit | [FAsyncTask and FAutoDeleteAsyncTask](#fasynctask-and-fautodeleteasynctask) | | Data-parallel loops | [ParallelFor](#parallelfor) | | Long-lived dedicated thread | [FRunnable and FRunnableThread](#frunnable-and-frunnablethread) | | Locks, events, atomics, queues, shared pointers | [Synchronization](#synchronization) | | Per-frame callbacks and delayed calls | [Tickers and Timers](#tickers-and-timers) | | UObject, GC and render-thread rules | [Thread Safety Rules](#thread-safety-rules) | | Old forms | [Deprecated — do not use](#deprecated--do-not-use) |

Threading Model

| Thread | Check | Owns | |---|---|---| | Game thread | `IsInGameThread()` (`CoreGlobals.h`) | All UObject access, Blueprint, gameplay, timers, tickers | | Render thread | `IsInRenderingThread()` | Scene proxies, render commands (`ENQUEUE_RENDER_COMMAND`) | | RHI thread | `IsInRHIThread()` | GPU command submission | | Worker threads | none | `UE::Tasks` scheduler, TaskGraph `AnyThread`, `ParallelFor` | | Thread pools | none | `GThreadPool`, `GBackgroundPriorityThreadPool`, `GIOThreadPool`; `GLargeThreadPool` only `WITH_EDITOR` (`Misc/QueuedThreadPool.h`) |

Golden rule: UObjects are game-thread-only. Compute off-thread on plain data, then apply results on the game thread through a `TWeakObjectPtr` (see [Thread Safety Rules](#thread-safety-rules)).

Pattern Selection

| Need | Use | Result | |---|---|---| | One-shot background work, dependencies, chaining | `UE::Tasks::Launch` | `TTask<T>` | | Run a lambda on the game thread from anywhere | `AsyncTask(ENamedThreads::GameThread, ...)` | none | | Future-style result with execution-context choice | `Async(EAsyncExecution, ...)` | `TFuture<T>` | | Serialize tasks touching one resource (FIFO) | `UE::Tasks::FPipe` | `TTask<T>` | | Cap how many tasks run at once | `UE::Tasks::FTaskConcurrencyLimiter` | none | | Reusable pooled work unit with owner-managed lifetime | `FAsyncTask<T>` / `FAutoDeleteAsyncTask<T>` | via `GetTask()` | | Data-parallel loop, caller blocks | `ParallelFor` | none | | Long-lived thread (socket, file watcher, sim loop) | `FRunnable` + `FRunnableThread::Create` | manual | | Per-frame callback outside an Actor tick | `FTSTicker::GetCoreTicker().AddTicker` | handle | | Delayed or repeating call on the game thread | `FTimerManager::SetTimer` | `FTimerHandle` |

UE::Tasks

#include "Tasks/Task.h"
// Tasks/Task.h:299
template<typename TaskBodyType>
UE::Tasks::TTask<TInvokeResult_T<TaskBodyType>> Launch(const TCHAR* DebugName, TaskBodyType&& TaskBody,
    ETaskPriority Priority = ETaskPriority::Normal,
    EExtendedTaskPriority ExtendedPriority = EExtendedTaskPriority::None,
    ETaskFlags Flags = ETaskFlags::None);
// Tasks/Task.h:324 — same, with a prerequisites collection as the third parameter
template<typename TaskBodyType, typename PrerequisitesCollectionType>
UE::Tasks::TTask<TInvokeResult_T<TaskBodyType>> Launch(const TCHAR* DebugName, TaskBodyType&& TaskBody,
    PrerequisitesCollectionType&& Prerequisites,
    ETaskPriority Priority = ETaskPriority::Normal,
    EExtendedTaskPriority ExtendedPriority = EExtendedTaskPriority::None,
    ETaskFlags Flags = ETaskFlags::None);
using namespace UE::Tasks;

TArray<int32> Data;
TTask<int32> Sum = Launch(UE_SOURCE_LOCATION, [Data]() { return ComputeSum(Data); });

// Prerequisites: TaskB runs after TaskA completes. Handles are copyable; GetResult() is non-const.
TTask<FVector> TaskA = Launch(UE_SOURCE_LOCATION, []() { return FVector(1.f, 2.f, 3.f); });
TTask<void> TaskB = Launch(UE_SOURCE_LOCATION,
    [TaskA]() mutable { const FVector Pos = TaskA.GetResult(); ConsumePosition(Pos); },
    Prerequisites(TaskA), ETaskPriority::BackgroundNormal);

// Manual gate: nothing after the event starts until Trigger()
FTaskEvent Gate{ UE_SOURCE_LOCATION };
TTa
Read more
@quodsoler
Ships withunreal-engine-skills

A collection of 31 AI agent skills for Unreal Engine C++ development. Built for game developers who want AI coding agents to help write correct, production-quality UE5 C++ code.

Stars on GitHub

Momentum

stars in total
468
Star history of quodsoler/unreal-engine-skills on GitHub, a chart by star-history.com

Other skills on unreal-engine-skills.

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw3w393k
@openclaw@openclawInstall Skill

Questions about ue-async-threading.

Which coding agents can use ue-async-threading?
ue-async-threading installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.