harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Dmitriev (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3888) [classlib][nio] java.nio.channels.Selector.select(long timeout) does not wait on empty keys
Date Thu, 17 May 2007 10:26:16 GMT
[classlib][nio] java.nio.channels.Selector.select(long timeout) does not wait on empty keys

                 Key: HARMONY-3888
                 URL: https://issues.apache.org/jira/browse/HARMONY-3888
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Sergey Dmitriev

java.nio.channels.Selector.select(long timeout) doesn't fall to sleep
if keys is empty. Actually specification says nothing about such an
optimization as "if keys.empty() return immediately regardless of
timeout value".

] boy@sun ~
] cat selector.java
import java.nio.channels.*;
public class selector {
    public static void main(String args[]) throws Exception {
        Selector selector = Selector.open();
        System.out.println("=" + selector);
        System.out.println("=" + selector);

] boy@sun ~
] time ~/harmony-m1/bin/java -showversion selector
Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors,
as applicable.
java version "1.5.0" 
pre-alpha : not complete or compatible
svn = r533500, (Apr 30 2007), Linux/ia32/gcc 3.3.3, release build
real    0m1.280s
user    0m1.125s
sys     0m0.075s

] boy@sun ~
] time java -showversion selector
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
BEA JRockit(R) (build R26.3.0-32-58710-1.5.0_06-20060308-2022-linux-ia32, )
real    0m12.166s
user    0m0.536s
sys     0m0.146s

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message