This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] [POSIX]: natSelectorImplPosix.cc: timeout==0 === infinite timeout


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;




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]