ThreadPool basic implementation