TScopeUnlock

RAII-style scope unlocking of a synchronisation primitive `MutexType_ is required to implement `Lock_ and `Unlock_ methods Example: { TScopeLock ScopeLock(CriticalSection); for (FElementType& Element : ThreadUnsafeContainer) { TScopeUnlock ScopeUnlock(CriticalSection); Process(Element); } }

Choose your operating system:

Windows

macOS

Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Misc/ScopeLock.h

Include

#include "Misc/ScopeLock.h"

Syntax

template<typename MutexType>
class TScopeUnlock

Remarks

RAII-style scope unlocking of a synchronisation primitive MutexType_ is required to implement Lock and `Unlock methods Example: { TScopeLock<FCriticalSection> ScopeLock(CriticalSection); for (FElementType& Element : ThreadUnsafeContainer) { TScopeUnlock<FCriticalSection> ScopeUnlock(CriticalSection); Process(Element); } }

Constructors

Name Description

Public function

TScopeUnlock

(
    TScopeUnlock&&
)

Public function

TScopeUnlock

(
    const TScopeUnlock&
)

Public function

TScopeUnlock

(
    MutexType& InMutex
)

Destructors

Name Description

Public function

~TScopeUnlock()

Operators

Name Description

Public function

TScopeUnlock...

 

operator=

(
    const TScopeUnlock&
)

Public function

TScopeUnlock...

 

operator=

(
    TScopeUnlock&&
)