jsr370-experts@jax-rs-spec.java.net

Re: Thread Pools

From: Adam Bien <abien_at_adam-bien.com>
Date: Tue, 7 Feb 2017 08:08:18 +0100

Hi Pavel,

> On 6 Feb 2017, at 09:44, Pavel Bucek <pavel.bucek_at_oracle.com> wrote:
>
> Hi Adam,
>
> 1) it's still not there. We are trying to address bigger items first.
o.k.
>
> 2) if there will be a way how to configure the pool (Executor service) used for async invocations, it will be most likely "global", so used for any action which is performed on different thread.
Perfect. Extension of the Configuration interface with a dedicated method would meet that requirement.
>
> 3) how is that helpful? I can see that as a general configuration (Supplier#get() is invoked only when needed), but in the case you are mentioning, its guaranteed that it will be invoked.
I could pass @Inject Instance<ExecutorService> service directly or lookup the "right" ExecutorService on demand dynamically.

Is not as important as 1.,

thx,

adam
>
> Thanks and regards,
> Pavel
>
>
> On 05/02/2017 22:48, Adam Bien wrote:
>> Hi Pavel,
>>
>> 1. I still miss a method to pass a thread pool (ExecutorService) for the Async execution in e.g. : public AsyncInvoker async();
>> 2. IMO it should be also possible to pass a ExecutorService via Configuration directly to the Client. For this purpose we could extend the Configuration to accept an ExecutorService instance,
>> 3. I'm missing: RxInvokerProvider#getRxInvoker(SyncInvoker syncInvoker, Supplier<ExecutorService> executorService)
>>
>> Whenever we pass an ExecutorService, there should be also a Supplier<ExecutorService> Variant,
>>
>> thanks,
>>
>> adam
>