Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4066781
Votes 1
Synopsis java.io: Support polling/select-like functionality
Category java:classes_io
Reported Against 1.1.2 , 1.1.3
Release Fixed
State 11-Closed, duplicate of 4075058, request for enhancement
Priority: 3-Medium
Related Bugs 4075058 , 4081138
Submit Date 23-JUL-1997
Description




We *really* would like to see a mechanism similar
to the select(3C) call in Unix/Posix. Basically,
you could give this mechanism a list of input
streams, and it would block until one (any one)
of the streams became available for reading.

You can currently get half of the way there
by using InputStream.available(), but you would
have to constantly poll over a set of InputStreams
calling available(), instead of blocking.

The immediate upshoot of a select mechanism would
be to solve a problem we have using Runtime.exec()
and Processes; that is, if you want to pipe
the new Process' stdin, stdout and stderr to
the normal ones (ie the terminal) you have to use
a seperate thread for each stream, otherwise
the buffers on those streams might become full
and the process will block.

Thank you for your time :)

======================================================================
Work Around





======================================================================
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang