unify thread crash guarding