Use attached threads with pthread_join().
This also clears up a potential race around ping_thread_cnt as it was protected by ping_mutex in one location and shutdown_mutex in another.
Please register or sign in to comment
This also clears up a potential race around ping_thread_cnt as it was protected by ping_mutex in one location and shutdown_mutex in another.