Terrific
发自我的 iPhone 在 2013-6-26,16:35,Emmanuel Lécharny <elecha...@gmail.com> 写道: > Le 6/26/13 10:09 AM, Simo Chiegang, Boris Arthur RD-P8.1 a écrit : >> Hi guys, >> >> my question: the method messageReceived(IoSession, Object) in the class >> IoHandlerAdapter executes parallel or sequenciel? > > Depends. > > 1) You have many clients (ie, many sessions) > the server will process as many messageReceived() as it has IoProcessor. > The number of IoProcessor is configurable, and default to number of Core > +1. On a Cure 2 DUO, you will have at least 3 IOProcessor, unless you > change this number when you created the Accessor. > > 2) You have one client, which sends many requests > > 2-a) You have no ExecutorFilter in the chain > In this case, the handler will process ever message sequentially. If it > takes a while to process a message, all the other will wait. > > 2-b) You have an ExecurotFilter in the chain > This time, each incoming message will be processed by a separate > threads. You will have to take care of the shared resources for this > session. > > > -- > Regards, > Cordialement, > Emmanuel Lécharny > www.iktek.com >