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.

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.

You may find out that it ends up being easier since you
write your code to deal with one file and that one file
only and just get multiple objects or different classes
together to handle the whole combination.

Finally, it turns out that to implement the Java VM spec
without actual native threads (aka Green threads) the JVM
actually does this type of work for you internally.  In
fact, it hides all of the messyness and lets you worry
about the behavior you want rather than the mechanisms needed
to produce the results.


Michael Sinz -- Director of Research & Development, NextBus Inc.
mailto:[EMAIL PROTECTED] --------- http://www.nextbus.com
My place on the web ---> http://www.users.fast.net/~michael_sinz



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

Reply via email to