UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::ParkingLot Namespace Reference

Namespaces

namespace  Private
 

Classes

struct  FWaitState
 
struct  FWakeState
 

Functions

FWaitState Wait (const void *Address, TFunctionWithContext< bool()> CanWait, TFunctionWithContext< void()> BeforeWait)
 
FWaitState WaitFor (const void *Address, TFunctionWithContext< bool()> CanWait, TFunctionWithContext< void()> BeforeWait, FMonotonicTimeSpan WaitTime)
 
FWaitState WaitUntil (const void *Address, TFunctionWithContext< bool()> CanWait, TFunctionWithContext< void()> BeforeWait, FMonotonicTimePoint WaitTime)
 
void WakeOne (const void *Address, TFunctionWithContext< uint64(FWakeState)> OnWakeState)
 

Detailed Description

ParkingLot is a global table of queues of waiting threads keyed by memory address.

Function Documentation

◆ Wait()

FWaitState UE::ParkingLot::Wait ( const void Address,
TFunctionWithContext< bool()>  CanWait,
TFunctionWithContext< void()>  BeforeWait 
)
inline

Queue the calling thread to wait if CanWait returns true. BeforeWait is only called if CanWait returns true.

Parameters
AddressAddress to use as the key for the queue. The same address is used to wake the thread.
CanWaitFunction called while the queue is locked. A return of false cancels the wait.
BeforeWaitFunction called after the queue is unlocked and before the thread waits.

◆ WaitFor()

FWaitState UE::ParkingLot::WaitFor ( const void Address,
TFunctionWithContext< bool()>  CanWait,
TFunctionWithContext< void()>  BeforeWait,
FMonotonicTimeSpan  WaitTime 
)
inline

Queue the calling thread to wait if CanWait returns true. BeforeWait is only called if CanWait returns true.

Parameters
AddressAddress to use as the key for the queue. The same address is used to wake the thread.
CanWaitFunction called while the queue is locked. A return of false cancels the wait.
BeforeWaitFunction called after the queue is unlocked and before the thread waits.
WaitTimeRelative time after which waiting is automatically canceled and the thread wakes.

◆ WaitUntil()

FWaitState UE::ParkingLot::WaitUntil ( const void Address,
TFunctionWithContext< bool()>  CanWait,
TFunctionWithContext< void()>  BeforeWait,
FMonotonicTimePoint  WaitTime 
)
inline

Queue the calling thread to wait if CanWait returns true. BeforeWait is only called if CanWait returns true.

Parameters
AddressAddress to use as the key for the queue. The same address is used to wake the thread.
CanWaitFunction called while the queue is locked. A return of false cancels the wait.
BeforeWaitFunction called after the queue is unlocked and before the thread waits.
WaitTimeAbsolute time after which waiting is automatically canceled and the thread wakes.

◆ WakeOne()

void UE::ParkingLot::WakeOne ( const void Address,
TFunctionWithContext< uint64(FWakeState)>  OnWakeState 
)
inline

Wake one thread from the queue of threads waiting on the address.

Parameters
AddressAddress to use as the key for the queue. Must match the address used in Wait.
OnWakeStateFunction called while the queue is locked. Receives the wake state. Returns WakeToken.