Add clang-format (#1086)

Co-authored-by: mwilsnd <mwilsnd@gmail.com>
This commit is contained in:
Bart Louwers
2023-05-01 16:57:37 +02:00
committed by GitHub
parent 403a12bd1b
commit 71f6da2722
1018 changed files with 27876 additions and 25862 deletions

View File

@@ -33,9 +33,7 @@ public:
cb();
}
void sync(std::promise<void> barrier) {
barrier.set_value();
}
void sync(std::promise<void> barrier) { barrier.set_value(); }
private:
AsyncTask *async;
@@ -75,8 +73,9 @@ TEST(AsyncTask, DestroyShouldNotRunQueue) {
TEST(AsyncTask, DestroyAfterSignaling) {
RunLoop loop;
// We're creating two tasks and signal both of them; the one that gets fired first destroys
// the other one. Make sure that the second one we destroyed doesn't fire.
// We're creating two tasks and signal both of them; the one that gets fired
// first destroys the other one. Make sure that the second one we destroyed
// doesn't fire.
std::unique_ptr<AsyncTask> task1, task2;
@@ -142,7 +141,9 @@ TEST(AsyncTask, ThreadSafety) {
for (unsigned i = 0; i < numThreads; ++i) {
// The callback runs on the worker, thus the atomic type.
workerRef.invoke(&TestWorker::runWithCallback, [&] { if (!--completed) loop.stop(); });
workerRef.invoke(&TestWorker::runWithCallback, [&] {
if (!--completed) loop.stop();
});
}
loop.run();