Quiz · Multithreading: An Overview · lesson 2 of 10
Quiz — a forgotten join
What happens if a std::thread is destroyed without join or detach?
#include <iostream>
#include <thread>
void greet() {
std::cout << "hi\n";
}
int main() {
std::thread t(greet);
}