Separated out thread_join in ULT.h