Callback Based Selectors
richard.warburton at gmail.com
Sat Jan 16 11:14:43 UTC 2016
I've prototyped a callback based addition to the NIO Selector, which I've
previously talked through a bit with Alan Bateman. The goal of the callback
based selector is to avoid the current pattern of calling select/selectNow
on a Nio selector and then having to iterate over a hashmap produced. This
pattern being quite object allocation heavy for a critical path and also
involving obtaining and releasing multiple locks. I'd like to propose that
the following patch, which adds the ability to perform a select on a
Selector that takes a callback handler.
I'm happy to iterate on the patch a bit based upon people's feedback and
discuss any potential concerns or issues that you may have with the patch.
Looking forward to hearing your feedback.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nio-dev