Mir

Code review comment for lp:~raof/mir/provide-event-fd

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

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