This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[PATCH] [POSIX]: natSelectorImplPosix.cc: timeout==0 === infinite timeout
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: Michael Koch <konqueror at gmx dot de>
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>
- Date: Tue, 02 Dec 2003 19:33:22 -0600
- Subject: [PATCH] [POSIX]: natSelectorImplPosix.cc: timeout==0 === infinite timeout
- Reply-to: gnustuff at thisiscool dot com
Hi Michael,
The JavaDoc says that Selector.select(0) should be
treated as an infinite timeout.
The NIO stuff is working more! Nice job. The first
channels test in NetTest passes now (with this patch)!
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
ChangeLog
2003-12-02 Mohan Embar <gnustuff@thisiscool.com>
* gnu/java/nio/natSelectorImplPosix.cc
(implSelect): A timeout of 0 means an infinite
timeout.
Index: gnu/java/nio/natSelectorImplPosix.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/natSelectorImplPosix.cc,v
retrieving revision 1.2
diff -u -2 -r1.2 natSelectorImplPosix.cc
--- gnu/java/nio/natSelectorImplPosix.cc 13 Nov 2003 10:09:40 -0000 1.2
+++ gnu/java/nio/natSelectorImplPosix.cc 3 Dec 2003 01:07:04 -0000
@@ -58,6 +58,8 @@
// If not legal timeout value is given, use NULL.
- // This means an infinite timeout.
- if (timeout >= 0)
+ // This means an infinite timeout. The specification
+ // also says that a zero timeout should be treated
+ // as infinite.
+ if (timeout > 0)
{
time_data = &real_time_data;