VTK
9.3.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Common
Core
vtkAtomicMutex.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2
// SPDX-License-Identifier: BSD-3-Clause
15
#ifndef vtkAtomicMutex_h
16
#define vtkAtomicMutex_h
17
18
#include "vtkCommonCoreModule.h"
// For export macro
19
#include <atomic>
// For std::atomic
20
21
VTK_ABI_NAMESPACE_BEGIN
22
23
class
VTKCOMMONCORE_EXPORT
vtkAtomicMutex
24
{
25
public
:
26
// left public purposely to allow for copy construction
27
vtkAtomicMutex
();
28
~
vtkAtomicMutex
() =
default
;
29
vtkAtomicMutex
(
const
vtkAtomicMutex
& other);
30
vtkAtomicMutex
& operator=(
const
vtkAtomicMutex
& other);
31
33
40
void
lock();
41
void
unlock();
43
private
:
44
std::atomic_bool Locked;
45
};
46
47
VTK_ABI_NAMESPACE_END
48
#endif // vtkAtomicMutex_h
49
// VTK-HeaderTest-Exclude: vtkAtomicMutex.h
vtkAtomicMutex
mutual exclusion locking class using atomic operations
Definition:
vtkAtomicMutex.h:23
Generated on Sun Dec 8 2024 22:10:10 for VTK by
1.8.10