You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
removed assert if ticker's delegate is removed multiple times
#jira UE-124560 #rb francis.hurteau vincent.gauthier #ROBOMERGE-SOURCE: CL 17380188 in //UE5/Main/... #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139) [CL 17380196 by andriy tylychko in ue5-release-engine-test branch]
This commit is contained in:
@@ -34,9 +34,8 @@ void FTSTicker::RemoveTicker(FDelegateHandle Handle)
|
||||
if (FElementPtr Element = Handle.Pin())
|
||||
{
|
||||
// mark the element as removed and if it's being ticked atm, spin-wait until its execution is finished
|
||||
uint64 PrevState = Element->State.fetch_add(FElement::RemovedState, std::memory_order_acquire); // "acquire" to prevent potential
|
||||
uint64 PrevState = Element->State.fetch_or(FElement::RemovedState, std::memory_order_acquire); // "acquire" to prevent potential
|
||||
// resource release after RemoveTicker() to be reordered before it
|
||||
checkf((PrevState & 0x1) == FElement::DefaultState, TEXT("The delegate is already removed (%u)"), PrevState);
|
||||
uint32 ExecutingThreadId = GetThreadId(PrevState);
|
||||
|
||||
while (ExecutingThreadId != 0 && // is being executed right now
|
||||
|
||||
Reference in New Issue
Block a user