This page has been translated automatically.
Видеоуроки
Интерфейс
Основы
Продвинутый уровень
Подсказки и советы
Основы
Программирование на C#
Рендеринг
Профессиональный уровень (SIM)
Принципы работы
Свойства (properties)
Компонентная Система
Рендер
Физика
Браузер SDK 2
Лицензирование и типы лицензий
Дополнения (Add-Ons)
Демонстрационные проекты
Samples
Редактор UnigineEditor
Обзор интерфейса
Работа с ассетами
Контроль версий
Настройки и предпочтения
Работа с проектами
Настройка параметров ноды
Setting Up Materials
Настройка свойств
Освещение
Sandworm
Использование инструментов редактора для конкретных задач
Расширение функционала редактора
Встроенные объекты
Ноды (Nodes)
Объекты (Objects)
Эффекты
Декали
Источники света
Geodetics
World-ноды
Звуковые объекты
Объекты поиска пути
Player-ноды
Программирование
Основы
Настройка среды разработки
Примеры использования
C++
C#
UnigineScript
Унифицированный язык шейдеров UUSL (Unified UNIGINE Shader Language)
Плагины
Форматы файлов
Материалы и шейдеры
Rebuilding the Engine Tools
Интерфейс пользователя (GUI)
Двойная точность координат
Справочник API
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
Работа с контентом
Оптимизация контента
Материалы
Визуальный редактор материалов
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Учебные материалы

Unigine::ScopedMutexLock Class

Header: #include <UnigineThread.h>

Template class that implements the RAII (Resource Acquisition Is Initialization) pattern to manage mutex locking in a multithreaded environment. This class ensures that a mutex is automatically locked upon construction and unlocked when the object goes out of scope.

This class has the following aliases:

Alias Description Type
ScopedSpinLock
ScopedLock
Alias for ScopedMutexLock using MutexSpin class for spin-based scoped locking. Ensures the spinlock is acquired on construction and released on destruction. MutexSpin
ScopedReentrantSpinLock
ScopedReentrantLock
Alias for ScopedMutexLock using ReentrantMutexSpin enabling scoped locking of reentrant spinlocks. ReentrantMutexSpin
ScopedCriticalSectionLock Alias for ScopedMutexLock using MutexCriticalSection. Provides scoped RAII-style locking using a Windows CRITICAL_SECTION. MutexCriticalSection
ScopedSlimLock Alias for ScopedMutexLock using MutexSlim. Provides scoped RAII-style locking using a Windows SRW Lock. MutexSlim
ScopedReentrantSlimLock Alias for ScopedMutexLock using ReentrantMutexSlim. Provides scoped RAII-style locking with support for reentrance using a Windows SRW Lock. ReentrantMutexSlim
ScopedSlimAdvanceLock Alias for ScopedMutexLock using MutexSlimAdvance. Provides RAII-style scoped locking with the ability to check whether the lock is currently held using a Windows SRW Lock. MutexSlimAdvance
ScopedCriticalSectionAdvanceLock Alias for ScopedMutexLock using MutexCriticalSectionAdvance. Provides RAII-style scoped locking with the ability to check whether the lock is currently held using a Windows CRITICAL_SECTION. MutexCriticalSectionAdvance
ScopedPThreadLock Alias for ScopedMutexLock using MutexPThread. Provides scoped RAII-style locking via Linux pthread_mutex_t mutex. MutexPThread
ScopedReentrantPThreadLock Alias for ScopedMutexLock using ReentrantMutexPThread. Provides scoped locking with reentrance via Linux pthread_mutex_t mutex. ReentrantMutexPThread
ScopedPThreadAdvanceLock Alias for ScopedMutexLock using MutexPThreadAdvance. Provides scoped locking with internal state tracking via Linux pthread_mutex_t mutex. MutexPThreadAdvance

ScopedMutexLock Class

Members


ScopedMutexLock ( MutexType& m ) #

Constructor that locks the provided mutex. The lock remains held for the duration of the ScopedMutexLock object's lifetime.

Arguments

  • MutexType& m - A reference to a mutex object to be locked. The mutex must provide lock() and unlock() member functions.

~ScopedMutexLock ( ) #

Destructor that automatically unlocks the mutex when the ScopedMutexLock object goes out of scope.

The information on this page is valid for UNIGINE 2.20 SDK.

Last update: 10.07.2025
Build: ()