66
77#include < array>
88#include < chrono>
9- // #include <execution> // tbb or similar required
9+ // #include <execution> // tbb or similar required
1010#include < functional>
1111#include < future>
1212#include < mutex>
@@ -52,7 +52,7 @@ TEST(Mutex, try_many_unlocked) {
5252
5353TEST (Mutex, try_many_one_locked) {
5454 std::array<std::timed_mutex, 30 > mtxs;
55- auto th = std::jthread ([&]{
55+ auto th = std::jthread ([&] {
5656 std::lock_guard lg (mtxs.back ());
5757 std::this_thread::sleep_for (15ms);
5858 });
@@ -65,11 +65,11 @@ TEST(Mutex, try_many_one_locked) {
6565
6666TEST (Mutex, return_last_failed) {
6767 std::array<std::timed_mutex, 2 > mtxs;
68- auto th = std::jthread ([&]{
69- std::lock (mtxs[0 ],mtxs[1 ]);
68+ auto th = std::jthread ([&] {
69+ std::lock (mtxs[0 ], mtxs[1 ]);
7070 std::this_thread::sleep_for (10ms);
7171 mtxs[0 ].unlock (); // 5ms after try_lock_for started, 15ms left
72-
72+
7373 // try_lock_for here hangs on mtxs[1] and should return 1:
7474 std::this_thread::sleep_for (20ms);
7575 mtxs[1 ].unlock ();
@@ -84,8 +84,8 @@ TEST(Mutex, succeed_with_three_in_tricky_sequence) {
8484 // A different implementation may behave differently but should
8585 // still succeed in locking all three in time.
8686 std::array<std::timed_mutex, 3 > mtxs;
87- auto th = std::jthread ([&]{
88- std::lock (mtxs[0 ],mtxs[1 ], mtxs[2 ]);
87+ auto th = std::jthread ([&] {
88+ std::lock (mtxs[0 ], mtxs[1 ], mtxs[2 ]);
8989 std::this_thread::sleep_for (10ms);
9090 mtxs[0 ].unlock (); // 5ms after try_lock_for started, 15ms left
9191 // try_lock_for gets this and jumps to mtxs[1]
0 commit comments