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

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -