"david.lloyd(a)jboss.com" wrote :
| This is essentially what I've done. My OrderedExecutorFactory is much simpler
than the one in MINA (there's some IoSession-specific stuff in theirs so you can't
really use it verbatim; mine is generic).
|
| Since the link seems to have gotten "killed" in your "editing"
session, here it is again:
http://tinyurl.com/33b4gq
That's the kind of thing. Although I'd use a ConcurrentLinkedQueue or
LinkedBlockingQueue to prevent having to synchronize on the whole list.
Also I'd caution against the "execute on current thread if queue is empty"
optimisation since if the current thread is the thread that does IO from the selector this
can keep that thread tied up for a long time, during which time it can't service any
more IO requests.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140658#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...