![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <ScopeLock.h>
Inheritance diagram for FScopeLock:Public Member Functions | |
| FScopeLock (TNotNull< FCriticalSection * > InSyncObject) | |
Implements a scope lock.
This is a utility class that handles scope level locking. It's very useful to keep from causing deadlocks due to exceptions being caught and knowing about the number of locks a given thread has on a resource. Example:
{ // Synchronize thread access to the following data FScopeLock ScopeLock(SyncObject); // Access data that is shared among multiple threads ... // When ScopeLock goes out of scope, other threads can access data }
|
inlineexplicit |
Constructor that performs a lock on the synchronization object
| InSyncObject | The synchronization object to manage |