This is a general Java proposal, but here it is anyway:

Handling I/O on several file descriptors can not be done
efficiently without using multiple threads. Why not add
a method to reach the select function of the underlying OS?

Add a new class java.io.FileDescriptorSet with methods like:
void set(FileDescriptor fd) throws IOException
void clear(FileDescriptor fd) throws IOException
boolean isSet(FileDescriptor fd) throws IOException
void zero() throws IOException

The select method could be added to java.lang.System or to
some apropriate class in java.io:
static int select(FileDescriptorSet readfds, FileDescriptorSet writefds,
                  FileDescriptorSet exceptfds) throws IOException

Can this be done, and if so: why has it not been done already?

Comments please..

//Per Widerlund


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to