3rd rewrite of thread pool, currently broken