threadpool & thread assignment