スレッドで thread1 thread2の2つを走らせている場合
正常狩猟、異常終了両方で2つのthread1 thread2とも同時に終了させて
再度、起動したいのですが、どのようにして終了させたら安全ですか?

pthread_cancel(),ptrhread_join,pthread_exit