Michael Sinz wrote:
MS> Why?  Java is platform independant and many (most) non-UNIX
MS> platforms use other mechansims and, if they have a POSIX
MS> layer, they emulate it only.

If that is the case, then there is nothing to do - Java must
remain platform independent. I thought that something similar to
select was available in all OS:es.

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

A thread uses lots of resources. I am not sure I buy your
argument: threads are part of the specification and therefore
we cannot change the specification..

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

Yes, it is indeed a simple and elegant way to handle things,
but you waste a lot of precious resources. When you want to
handle hundreds of socket connections and must start up two
threads per connection you soon run into trouble.

//Per Widerlund


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

Reply via email to