generate thread id for new thread in case of timeout