Simplify my code

Use nub_thread_join internally to prevent excessive code duplication.