Stroika Library 3.0d24
 
Loading...
Searching...
No Matches
AssertExternallySynchronizedMutex.h
Go to the documentation of this file.
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2026. All rights reserved
3 */
4#ifndef _Stroika_Foundation_Debug_AssertExternallySynchronizedMutex_h_
5#define _Stroika_Foundation_Debug_AssertExternallySynchronizedMutex_h_ 1
6
7#include "Stroika/Foundation/StroikaPreComp.h"
8
10
11/**
12 * \file
13 *
14 * \note Code-Status: <a href="Code-Status.md#Deprecated">Deprecated</a>
15 *
16 * DEPRECATED backward-compatibility header. Since Stroika v3.0d24, this class is called
17 * Debug::AssertExternallySynchronizedChecker and lives in AssertExternallySynchronizedChecker.h.
18 * Include that instead; this header exists only so existing code keeps building, and will be removed.
19 *
20 * WHY THE RENAME: it was never a mutex. It does not lock, it does not block, and it does not make
21 * anything thread safe - lock () asserts that no other thread is currently in a conflicting access and
22 * then returns. Calling it a 'Mutex' invited exactly the wrong reading of the ~1200 places that declare
23 * a ReadContext or WriteContext, ie "this code is now synchronized" rather than "assert nobody else is
24 * here". 'Checker' says what it does. See the class docs in AssertExternallySynchronizedChecker.h.
25 */
26
27namespace Stroika::Foundation::Debug {
28
29 /**
30 * \brief DEPRECATED alias - use AssertExternallySynchronizedChecker
31 *
32 * \deprecated Since Stroika v3.0d24 - use Debug::AssertExternallySynchronizedChecker (it never was
33 * a mutex - see the file note above).
34 */
36 [[deprecated ("Since Stroika v3.0d24 use Debug::AssertExternallySynchronizedChecker - it is not a mutex")]] =
38
39}
40
41#endif /*_Stroika_Foundation_Debug_AssertExternallySynchronizedMutex_h_*/
NOT a real mutex - just a debugging infrastructure support tool so in debug builds can be assured thr...