blob: 1caa73da32035f7cdd3a538e9a227b4983b18dcf [file] [log] [blame]
#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;
}