Skip to content
Quiz · Multithreading: An Overview · lesson 2 of 12

Quiz — a forgotten join

What happens if a std::thread is destroyed without join or detach?

C++
#include <iostream>
#include <thread>

void greet() {
    std::cout << "hi\n";
}

int main() {
    std::thread t(greet);
}

Subscribe to take the course

The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.

Sign in another way