make ThreadPool refcounted