From dff9de61a8cadde4857f70a977547fb3a408c526 Mon Sep 17 00:00:00 2001 From: Sebastien Ponce Date: Wed, 29 Oct 2025 12:15:39 +0100 Subject: [PATCH] Use prefix operator in the example of non thread safe code --- talk/concurrency/mutexes.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/talk/concurrency/mutexes.tex b/talk/concurrency/mutexes.tex index 5721e8d6..1fd4b433 100644 --- a/talk/concurrency/mutexes.tex +++ b/talk/concurrency/mutexes.tex @@ -5,7 +5,7 @@ \begin{exampleblockGB}{Example code}{https://godbolt.org/z/oGz61Pn19}{Race} \begin{cppcode*}{} int a = 0; - void inc() { a++; }; + void inc() { ++a; }; void inc100() { for (int i=0; i < 100; i++) inc(); };