feature: use a home-made thread pool to manage concurrency

thread pool code is embedded.