Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Where does Jetty dispatch to worker thread happens.

Hi,

On Fri, Oct 17, 2014 at 5:39 PM, Monish Gandhi <monishgandhi@xxxxxxxxx> wrote:
> Thanks Simone ! Also could you please confirm that the when socket connects
> and acceptor thread accepts the same, when does it go back to accepting new
> connections. Is it after registering ServerSocketChannel with selector and
> submitting to Selector queue (_changes.offer in SelectorManager.submit()). I
> assume the state in this SelectorManager.submit() in such case would be
> "PROCESS" and hence should come out immediately.

When a connection is accepted, it is passed to
SelectorManager.accept(), that returns immediately so that a new
connection may be accepted.
The number of acceptors can be configured, and those will all compete
to accept connections (although only one will succeed).

>  Is it ever possible that if my selectors are busy then my acceptor thread
> won't go back to accepting new connections?

No, it's not possible.

-- 
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