On 10/23/07, tiandike <[EMAIL PROTECTED]> wrote: > > in the source code of ExecutorFilter: > in function messageReceived : it call fireEvent function. > this function call executor.execute(new ProcessEventsRunnable(buf)); > > it will config multithread to execute the run function . > > in the run function of ProcessEventsRunnable it call > > processEvent(event.getNextFilter(), buffer.session, event > .getType(), event.getData()); > > in processEvent the code include > nextFilter.messageReceived(session, data); > > at last it will call the handler messageReceived. > > as you see processEvent is executed in multithread ,how to ensure "the > corresponding > IoHandler.messageReceived events will be called in the same order on the > server."??
As you see from the source code, there's an event buffer per session that maintains the message order. HTH, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
