Making the thread-pool size params generic