Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Misc/ScopeLock.h |
Include |
#include "Misc/ScopeLock.h" |
class FScopeLock
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(SynchObject); // Access data that is shared among multiple threads ... // When ScopeLock goes out of scope, other threads can access data } _
Name | Description | |
---|---|---|
|
FScopeLock ( |
Constructor that performs a lock on the synchronization object |
Name | Description | |
---|---|---|
|
~FScopeLock() |
Destructor that performs a release on the synchronization object. |