request for review: 7184932: Remove the temporary Selector usage in the NIO socket adapters
David M. Lloyd
david.lloyd at redhat.com
Tue Aug 28 08:14:40 PDT 2012
On 08/15/2012 04:09 PM, Rob McKenna wrote:
> Hi folks,
>
> Looking for a codereview of this change. Basically we're looking to
> avoid the use of temporary selectors in socket adapters. This should
> result in resource usage improvements for users who make extensive use
> of these adapters in multiple threads.
>
> http://cr.openjdk.java.net/~robm/7184932/webrev.02/
> <http://cr.openjdk.java.net/%7Erobm/7184932/webrev.02/>
What about generalizing that API a bit, and rolling it up to
SelectableChannel with methods like:
public abstract void await(int ops);
public abstract void await(int ops, long time, TimeUnit unit);
...where ops must conform to validOps().
This way it becomes trivial for anyone to mix blocking and non-blocking
APIs which is definitely a common API usage.
--
- DML
More information about the nio-dev
mailing list