Lightweight ThreadPool implementation.