just before thread launch