实现ThreadManager