Is there a way to handle the main thread, like any other thread, using C ++ 11 (or later) tools? Specifically, I am looking for the possibility of join() with the main thread. So basically, I would like to do something like: main_thread.join() , but don't know how to get the main_thread object.
Stream constructors do not seem to offer any objects based, for example, on the identifier of the stream obtained using get_id() . The this_thread namespace this_thread offers minimal functionality, but skips, for example, join() , which I am looking for.
smarr source share