Modify thread_pool, add comments