Callback Based Selectors

Richard Warburton richard.warburton at gmail.com
Sat Jan 16 11:14:43 UTC 2016


Hi gents,

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.

http://cr.openjdk.java.net/~rwarburton/select-now-4/

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.

regards,

  Richard Warburton

  http://insightfullogic.com
  @RichardWarburto <http://twitter.com/richardwarburto>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20160116/81d78d5c/attachment.html>


More information about the nio-dev mailing list