A threadpool implementation [1]