diff options
| author | Martin Hořeňovský | 2025-12-28 21:02:50 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2025-12-28 21:02:50 +0100 |
| commit | 970ec144f56d78703c51d08a855844e91c8560a8 (patch) | |
| tree | d8d2f3e784c6c2c230b7b7171dbd32f830504f45 /docs | |
| parent | eb3811c555eccd2de8b63ba16e0f62c444970acf (diff) | |
| download | catch3-970ec144f56d78703c51d08a855844e91c8560a8.tar.gz | |
Thread safety in assertions is no longer experimental
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/configuration.md | 12 | ||||
| -rw-r--r-- | docs/thread-safety.md | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/docs/configuration.md b/docs/configuration.md index f63a6d41..71496db0 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -17,7 +17,7 @@ [Disabling deprecation warnings](#disabling-deprecation-warnings)<br> [Overriding Catch's debug break (`-b`)](#overriding-catchs-debug-break--b)<br> [Static analysis support](#static-analysis-support)<br> -[Experimental thread safety](#experimental-thread-safety)<br> +[Thread safety in assertions (and messages)](#thread-safety-in-assertions-and-messages)<br> Catch2 is designed to "just work" as much as possible, and most of the configuration options below are changed automatically during compilation, @@ -316,17 +316,21 @@ no backwards compatibility guarantees._ are not meant to be runnable, only "scannable". -## Experimental thread safety + +<a id="experimental-thread-safety"></a> +## Thread safety in assertions (and messages) > Introduced in Catch2 3.9.0 +> Made non-experimental in Catch2 vX.Y.Z + Catch2 can optionally support thread-safe assertions, that means, multiple user-spawned threads can use the assertion macros at the same time. Due to the performance cost this imposes even on single-threaded usage, Catch2 defaults to non-thread-safe assertions. - CATCH_CONFIG_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS // enables thread safe assertions - CATCH_CONFIG_NO_EXPERIMENTAL_THREAD_SAFE_ASSERTIONS // force-disables thread safe assertions + CATCH_CONFIG_THREAD_SAFE_ASSERTIONS // enables thread safe assertions + CATCH_CONFIG_NO_THREAD_SAFE_ASSERTIONS // force-disables thread safe assertions See [the documentation on thread safety in Catch2](thread-safety.md#top) for details on which macros are safe and other notes. diff --git a/docs/thread-safety.md b/docs/thread-safety.md index e0092ded..aba03f55 100644 --- a/docs/thread-safety.md +++ b/docs/thread-safety.md @@ -20,7 +20,7 @@ test case macros is not thread-safe. The way sections define paths through the test is incompatible with user spawning threads arbitrarily, so this limitation is here to stay. -**Important: thread safety in Catch2 is [opt-in](configuration.md#experimental-thread-safety)** +**Important: thread safety in Catch2 is [opt-in](configuration.md#thread-safety)** ## Using assertion macros from spawned threads |