The Meson Build System http://mesonbuild.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
286 B

#include <unistd.h>
#include <iostream>
#include <thread>
int main(void) {
std::cout << "Before thread" << std::endl;
std::thread t([]() {
sleep(1);
std::cout << "In a thread." << std::endl;
});
t.join();
std::cout << "After thread" << std::endl;
}