finished thread pool implementation except finalizer