Thanks Simone, I am trying to understand how does configuring more acceptor 
help. Suggested number is equal to number of cores. The Either ways multiple 
acceptor threads would compete but only one would succeed. Which means all 
acceptor threads would be in BLOCKED state (waiting to lock) and only one would 
be RUNNABLE.    RegardsMonish
 

     On Monday, October 20, 2014 6:16 PM, Simone Bordet <[email protected]> 
wrote:
   

 Hi,

On Fri, Oct 17, 2014 at 5:39 PM, Monish Gandhi <[email protected]> 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.


   
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to