You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/limitations.md
+1-35Lines changed: 1 addition & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,40 +57,6 @@ again.
57
57
## Features
58
58
This section outlines some missing features, what is their status and their possible workarounds.
59
59
60
-
### Thread safe assertions
61
-
Catch2's assertion macros are not thread safe. This does not mean that
62
-
you cannot use threads inside Catch's test, but that only single thread
63
-
can interact with Catch's assertions and other macros.
64
-
65
-
This means that this is ok
66
-
```cpp
67
-
std::vector<std::thread> threads;
68
-
std::atomic<int> cnt{ 0 };
69
-
for (int i = 0; i < 4; ++i) {
70
-
threads.emplace_back([&]() {
71
-
++cnt; ++cnt; ++cnt; ++cnt;
72
-
});
73
-
}
74
-
for (auto& t : threads) { t.join(); }
75
-
REQUIRE(cnt == 16);
76
-
```
77
-
because only one thread passes the `REQUIRE` macro and this is not
78
-
```cpp
79
-
std::vector<std::thread> threads;
80
-
std::atomic<int> cnt{ 0 };
81
-
for (int i = 0; i < 4; ++i) {
82
-
threads.emplace_back([&]() {
83
-
++cnt; ++cnt; ++cnt; ++cnt;
84
-
CHECK(cnt == 16);
85
-
});
86
-
}
87
-
for (auto& t : threads) { t.join(); }
88
-
REQUIRE(cnt == 16);
89
-
```
90
-
91
-
We currently do not plan to support thread-safe assertions.
92
-
93
-
94
60
### Process isolation in a test
95
61
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.
96
62
@@ -187,5 +153,5 @@ but only when compiled with a C++20 conforming compiler. MSVC is currently
187
153
not conformant enough, but `clang-cl` will compile the assertion above
188
154
using MSVC STL without problem.
189
155
190
-
This change got in with MSVC v19.37](https://godbolt.org/z/KG9obzdvE).
156
+
[This change got in with MSVC v19.37](https://godbolt.org/z/KG9obzdvE).
0 commit comments