Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Fwd: Jetty Client 9.04 threads

Hi,

On Mon, Jul 15, 2013 at 6:29 PM, Kamil Gorlo <kgorlo@xxxxxxxxx> wrote:
> I've forwarded an email with explanation (about selector thread when
> using SSL). Or maybe you suggesting that everyting is OK?
>
> Precisely, I am asking why when using SSL client worker threads are
> not used at all and all "work" is in selector thread (including
> possibly heavy callback code)?

So the story is that SslConnection used to dispatch reads, so there
was no need to dispatch again in HttpClient.
However, SslConnection has been optimized to not dispatch anymore, but
the HttpClient code was not changed.
I'll restore the default to not call setDispatchIO(false) when using SSL.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=413108

In any case, there is no problem. HttpClient is completely
asynchronous, so it will never block.
The usual contract - and I will clarify this in the documentation - is
that if you need to do "heavy" code in the callbacks you need to
dispatch yourself.
HttpClient cannot dispatch callbacks for you because in the normal
case it will be a performance hit.

Thanks for the heads up.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.


Back to the top