initial threadpool library implementation