java - How to get a parameterized ExecutorService? -
how can executorservice instance specific type parameter?
i have java.util.concurrent.executorservice named service , i'm calling submit method parameterized callable future result generated callable.
void dosomething(callable<response> callback) { future<response> futureresponse = service.submit(callback); }
it works ok, service not-parameterized; ideally (i.e., executorservice<response>). i'm creating executor service executors.newfixedthreadpool(10), doesn't appear have way parameterize call. there anyway achieve this?
Comments
Post a Comment