summaryrefslogtreecommitdiffstats
path: root/test cases/cmake/16 threads/subprojects/cmMod/cmMod.cpp
blob: f971eeba051b1e603a04aa1d8134e9bf85ca92a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "cmMod.hpp"

#include <chrono>
#include <thread>

using namespace std::chrono_literals;

void CmMod::asyncIncrement() {
  std::thread t1([this]() {
    std::this_thread::sleep_for(100ms);
    num += 1;
  });

  t1.join();
}