According to cppref:
std::notify_all_at_thread_exitprovides a mechanism to notify other threads that a given thread has completely finished, including destroying all thread_local objects.
I know the exact semantics of std::notify_all_at_thread_exit. What makes me puzzled is:
How to register a callback function that will be called after a given thread has finished and destroyed all of its thread-local objects?