2850+ auto dispatchable = std::make_shared<mt::TestDispatchable>([dispatched]() 2851+ { 2852+ static std::atomic<int> dispatch_count{0}; 2853+ char buffer[80] = {0}; 2854+ pthread_getname_np(pthread_self(), buffer, sizeof(buffer)); 2855+ EXPECT_THAT(buffer, StartsWith(threadname_base)); 2856+ 2857+ if (++dispatch_count == threadcount) 2858+ { 2859+ dispatched->raise(); 2860+ } 2861+ else 2862+ { 2863+ dispatched->wait_for(10s); 2864+ } 2865+ });
I'm not convinced by the massive indents that this style causes. (Nor the multi-line diffs a simple change like "auto dispatchable" => "auto const dispatchable" would imply.)
« Back to merge proposal
2850+ auto dispatchable = std::make_ shared< mt::TestDispatc hable>( [dispatched] () getname_ np(pthread_ self(), buffer, sizeof(buffer)); threadname_ base)); >raise( ); >wait_for( 10s);
2851+ {
2852+ static std::atomic<int> dispatch_count{0};
2853+ char buffer[80] = {0};
2854+ pthread_
2855+ EXPECT_THAT(buffer, StartsWith(
2856+
2857+ if (++dispatch_count == threadcount)
2858+ {
2859+ dispatched-
2860+ }
2861+ else
2862+ {
2863+ dispatched-
2864+ }
2865+ });
I'm not convinced by the massive indents that this style causes. (Nor the multi-line diffs a simple change like "auto dispatchable" => "auto const dispatchable" would imply.)