Skip to content

Commit 6cdf257

Browse files
committed
Docs: fix highlighting of the ThreadSanitizer examples
The HOWTO sets the default highlight language to C, so the TSan report was lexed as C and raised a highlighting warning. Mark it, and the shell commands, with explicit languages.
1 parent a81eeec commit 6cdf257

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎Doc/howto/free-threading-extensions.rst‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,9 @@ locks, critical sections or atomic operations in an extension.
431431
operations is synchronized internally, so the program is free of data races
432432
even though it loses updates.
433433

434-
To use it, build a free-threaded interpreter with TSan enabled::
434+
To use it, build a free-threaded interpreter with TSan enabled:
435+
436+
.. code-block:: shell
435437
436438
./configure --disable-gil --with-thread-sanitizer --with-pydebug
437439
make
@@ -452,7 +454,9 @@ checked.
452454
Then run your tests with the TSan interpreter, using several threads that
453455
exercise the same objects. When a race is found, TSan prints the conflicting
454456
accesses with stack traces and a summary line. For example, for an extension
455-
function that increments a global variable without synchronization::
457+
function that increments a global variable without synchronization:
458+
459+
.. code-block:: none
456460
457461
WARNING: ThreadSanitizer: data race (pid=36446)
458462
Write of size 8 at 0x00010f1f8108 by thread T2:

0 commit comments

Comments
 (0)