modify assert in thread.hpp
update createtask for threadpool