Switch to threadpool
Threadpool improvements