Release thread pool resources on destruction
Fixed multiple definitions of schedule_task