We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a262cc3 + 7ca6a06 commit 4bf9324Copy full SHA for 4bf9324
1 file changed
core/os/mutex.h
@@ -59,7 +59,7 @@ class MutexImpl {
59
60
// This is written this way instead of being a template to overcome a limitation of C++ pre-17
61
// that would require MutexLock to be used like this: MutexLock<Mutex> lock;
62
-class MutexLock {
+class _NO_DISCARD_CLASS_ MutexLock {
63
union {
64
std::recursive_mutex *recursive_mutex;
65
std::mutex *mutex;
@@ -107,7 +107,7 @@ class MutexImpl {
107
_ALWAYS_INLINE_ Error try_lock() const { return OK; }
108
};
109
110
111
public:
112
explicit MutexLock(const MutexImpl<FakeMutex> &p_mutex) {}
113
0 commit comments