Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Remove 'thread safe assertions' from limitations.md

We now provide thread safe assertions as a configuration option.
Commit
4ed30881909fe8a7dcd25e0a9a969417d1dfb083
Author
Martin Hořeňovský ·
Parents
bdc634e9f1be

Files · Download .tar.gz

Changes

 docs/limitations.md | 36 +-----------------------------------
 1 file changed, 1 insertion(+), 35 deletions(-)

diff --git a/docs/limitations.md b/docs/limitations.md
index f5f60ba8..67085a80 100644
--- a/docs/limitations.md
+++ b/docs/limitations.md
@@ -57,40 +57,6 @@ again.
 ## Features
 This section outlines some missing features, what is their status and their possible workarounds.
 
-### Thread safe assertions
-Catch2's assertion macros are not thread safe. This does not mean that
-you cannot use threads inside Catch's test, but that only single thread
-can interact with Catch's assertions and other macros.
-
-This means that this is ok
-```cpp
-    std::vector<std::thread> threads;
-    std::atomic<int> cnt{ 0 };
-    for (int i = 0; i < 4; ++i) {
-        threads.emplace_back([&]() {
-            ++cnt; ++cnt; ++cnt; ++cnt;
-        });
-    }
-    for (auto& t : threads) { t.join(); }
-    REQUIRE(cnt == 16);
-```
-because only one thread passes the `REQUIRE` macro and this is not
-```cpp
-    std::vector<std::thread> threads;
-    std::atomic<int> cnt{ 0 };
-    for (int i = 0; i < 4; ++i) {
-        threads.emplace_back([&]() {
-            ++cnt; ++cnt; ++cnt; ++cnt;
-            CHECK(cnt == 16);
-        });
-    }
-    for (auto& t : threads) { t.join(); }
-    REQUIRE(cnt == 16);
-```
-
-We currently do not plan to support thread-safe assertions.
-
-
 ### Process isolation in a test
 Catch does not support running tests in isolated (forked) processes. While this might in the future, the fact that Windows does not support forking and only allows full-on process creation and the desire to keep code as similar as possible across platforms, mean that this is likely to take significant development time, that is not currently available.
 
@@ -187,5 +153,5 @@ but only when compiled with a C++20 conforming compiler. MSVC is currently
 not conformant enough, but `clang-cl` will compile the assertion above
 using MSVC STL without problem.
 
-This change got in with MSVC v19.37](https://godbolt.org/z/KG9obzdvE).
+[This change got in with MSVC v19.37](https://godbolt.org/z/KG9obzdvE).