MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnCancel

Method OnCancel

Source/Engine/Graphics/Async/GPUTasksManager.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void GPUTask::OnCancel()
52{
53 // Check if task is waiting for sync (very likely situation)
54 if (IsSyncing())
55 {
56 // Task has been performed but is waiting for a CPU/GPU sync so we have to cancel that
57 _context->OnCancelSync(this);
58 _context = nullptr;
59 SetState(TaskState::Canceled);
60 }
61
62 // Base
63 Task::OnCancel();
64}
65
66GPUTasksManager::GPUTasksManager()
67{

Callers

nothing calls this directly

Calls 2

SetStateFunction · 0.85
OnCancelSyncMethod · 0.80

Tested by

no test coverage detected