[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[jetty-dev] Fwd: Jetty Client 9.04 threads
|
Hi,
I initially sent this message to jetty-users list (no reaction so far)
but maybe dev list is better idea.
Meanwhile, I found reason in source code why im seeing such behaviour,
but I do not understand motivation behind this - could somebody please
explain me this?
HttpClient.java:
173 @Override
174 protected void doStart() throws Exception
175 {
176 if (sslContextFactory != null)
177 {
178 addBean(sslContextFactory);
179 // Avoid to double dispatch when using SSL
180 setDispatchIO(false);
181 }
Thanks!
---------- Forwarded message ----------
From: Kamil Gorlo <kgorlo@xxxxxxxxx>
Date: Fri, Jul 12, 2013 at 6:48 PM
Subject: Jetty Client 9.04 threads
To: jetty-users@xxxxxxxxxxx
Hi,
I see strange behaviour in my application using jetty async http
client (9.04), so I started to debug and then noticed not-obvious
thread usage by jetty client. I hope someone here will explain this to
me :)
Main question is: what for are "selector threads" and "worker" threads
(from executor in HttpClient) when using async http client?
Here is my first simple application:
https://gist.github.com/kgs/7fec9f1367be32e53b99/803bdb02c04d26af7dedfb8ebf2214074609f5bc
When I run this code, I see that almost all callbacks are called from
executor thread (only first is from main thread, which is OK) and this
is expected.
But when I add SSL support:
https://gist.github.com/kgs/7fec9f1367be32e53b99/ec6550c3eb3381fb0c06dd945a4defc4b87d92e8
Almost all callbacks are called from selector thread (also request
parsing, etc. happens in selector thread).
Is this bug or not? If not, please tell my why :)
Cheers,
--
Kamil Gorlo