Thread opened in a class, can't continue main?
How can I make it so that opening a thread in a class would not entirely stop the main function?
I start the class from main() and it automatically starts a thread
1 2 3 4 5
|
int main(){
Thread new_thread_class;
new_thread_class.start();
std::cout << "This does not display!" << std::endl;
}
|
Got the answer.
Instead of using pthread_join I used pthread_tryjoin_np
Topic archived. No new replies allowed.