+add thread singleton templete.