add a basic thread pool abstraction