From fb8197839c0bebc20fd68ee3f280da934c49c473 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Fri, 22 Dec 2017 21:16:02 +0000 Subject: Removing editor and refactoring code. --- tests/threadtest.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 tests/threadtest.cpp (limited to 'tests/threadtest.cpp') diff --git a/tests/threadtest.cpp b/tests/threadtest.cpp deleted file mode 100644 index 0527665a..00000000 --- a/tests/threadtest.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/** --------------------------------------------------------------------------- - * @file: threadtest.cpp - * - * Copyright (c) 2017 Yann Herklotz Grave - * MIT License, see LICENSE file for more details. - * ---------------------------------------------------------------------------- - */ - -#include - -#include -#include - -int main() -{ - int n = 5; - - std::cout << "n before: " << n << "\n"; - - auto f = [&]() { n = 8; }; - - std::thread t1(f); - - std::cout << "n after: " << n << "\n"; - - t1.join(); - - std::cout << "n after thread: " << n << "\n"; -} -- cgit