Michael Sinz wrote:
> On Fri, 28 May 1999 14:19:03 +0200, Per Widerlund wrote:
> >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?
> 
> Why?  Java is platform independant and many (most) non-UNIX
> platforms use other mechansims and, if they have a POSIX
> layer, they emulate it only.

Every OS I know has a mechanism like select(). Most of them
because they implement the BSD socket functions.

> Second, Java has threads built in.  Why not use them?
> One of the really nice parts of Java is that it has some
> of these concepts, such as threads and synchronization
> built in.  This is part of the language specification.
> One should use those mechanisms.

Using a thread for each filedescriptor is a waste of
resources. I really don't understand why there's no 
mechanism similar to select() in Java.
I might want to wait on several hundred sockets and
assign the connection to a thread from a thread pool
as soon as there's work to do.

-- 
 Bernhard Fastenrath                           phone +49 228 55991-0 (fax-44)
 Gesellschaft fuer Digitale Sicherheit mbH,    http://www.digital-security.com


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

Reply via email to