thread better decoupling, task cancel more effective, prepare for thread.pool
test fixes