![]() |
Ark Server API (ASA) - Wiki
|
#include <ScopeLock.h>
Collaboration diagram for FScopeLock:Public Member Functions | |
| UE_NODISCARD_CTOR | FScopeLock (FCriticalSection *InSynchObject) |
| ~FScopeLock () | |
| void | Unlock () |
Private Member Functions | |
| FScopeLock () | |
| FScopeLock (const FScopeLock &InScopeLock) | |
| FScopeLock & | operator= (FScopeLock &InScopeLock) |
Private Attributes | |
| FCriticalSection * | SynchObject |
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 }
Definition at line 26 of file ScopeLock.h.
|
inline |
Constructor that performs a lock on the synchronization object
| InSynchObject | The synchronization object to manage |
Definition at line 35 of file ScopeLock.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Destructor that performs a release on the synchronization object.
Definition at line 43 of file ScopeLock.h.
Here is the call graph for this function:
|
private |
Default constructor (hidden on purpose).
|
private |
Copy constructor( hidden on purpose).
|
inlineprivate |
Assignment operator (hidden on purpose).
Definition at line 66 of file ScopeLock.h.
|
inline |
Definition at line 48 of file ScopeLock.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 74 of file ScopeLock.h.