Enhanced thread safety tests with the latest lang release