diff options
Diffstat (limited to 'meson/test cases/cmake/16 threads/subprojects/cmMod/cmMod.cpp')
-rw-r--r-- | meson/test cases/cmake/16 threads/subprojects/cmMod/cmMod.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/meson/test cases/cmake/16 threads/subprojects/cmMod/cmMod.cpp b/meson/test cases/cmake/16 threads/subprojects/cmMod/cmMod.cpp new file mode 100644 index 000000000..f971eeba0 --- /dev/null +++ b/meson/test cases/cmake/16 threads/subprojects/cmMod/cmMod.cpp @@ -0,0 +1,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(); +} |