UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FScopeLock Class Reference

#include <ScopeLock.h>

+ Inheritance diagram for FScopeLock:

Public Member Functions

 FScopeLock (TNotNull< FCriticalSection * > InSyncObject)
 

Detailed Description

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 }

Constructor & Destructor Documentation

◆ FScopeLock()

FScopeLock::FScopeLock ( TNotNull< FCriticalSection * >  InSyncObject)
inlineexplicit

Constructor that performs a lock on the synchronization object

Parameters
InSyncObjectThe synchronization object to manage

The documentation for this class was generated from the following file: