From commits-return-56496-apmail-harmony-commits-archive=harmony.apache.org@harmony.apache.org Wed Nov 19 12:55:05 2008 Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 91260 invoked from network); 19 Nov 2008 12:55:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Nov 2008 12:55:05 -0000 Received: (qmail 84248 invoked by uid 500); 19 Nov 2008 12:55:13 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 84223 invoked by uid 500); 19 Nov 2008 12:55:13 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 84214 invoked by uid 99); 19 Nov 2008 12:55:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Nov 2008 04:55:13 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Nov 2008 12:53:59 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 92C6F234C2A2 for ; Wed, 19 Nov 2008 04:54:44 -0800 (PST) Message-ID: <1699479087.1227099284600.JavaMail.jira@brutus> Date: Wed, 19 Nov 2008 04:54:44 -0800 (PST) From: "Mark Hindess (JIRA)" To: commits@harmony.apache.org Subject: [jira] Closed: (HARMONY-3888) [classlib][nio] java.nio.channels.Selector.select(long timeout) does not wait on empty keys In-Reply-To: <10719592.1179397576596.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-3888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Hindess closed HARMONY-3888. --------------------------------- Works for me now. Closing. > [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 > Assignee: Mark Hindess > Attachments: 3888.patch, 3888_test.patch > > > 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); > selector.select(10000); > 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 > http://incubator.apache.org/harmony > =org.apache.harmony.nio.internal.SelectorImpl@425ba2a8 > =org.apache.harmony.nio.internal.SelectorImpl@425ba2a8 > > 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, ) > > =sun.nio.ch.PollSelectorImpl@10e72dc > =sun.nio.ch.PollSelectorImpl@10e72dc > > 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.