On Wed, 23 Sep 1998 09:29:19 -0400 (EDT), [EMAIL PROTECTED] wrote:

>
>On Tue, 22 Sep 1998, Gerald Gutierrez wrote:
>
>> I'm starting to pull out my hair from the fact that the current JDK is
>> based on user threads. I can't call anything that can potentially block,
>> because everything will block.
>> 
>
>Are you saying that if my application has 5 threads running, and
>one of them blocks on a blocking method (i.e., BufferedReader.readLine()
>on a client socket) then the 4 other threads are blocking (not running) 
>also during this time??

No...  The JVM and the green threads wrappers make all of this work
with the magic of select() and poll() and other such "wonderful"
things.

The problem comes when you use native methods and the native code blocks
on something (either because it is not using green threads wrappers or
because the blocking call is not part of the green threads wrapper)
Then you will block.

(Ok, so on older versions, reads from STDIN/STDOUT/STDERR were a problem
but this has been addressed)


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

Reply via email to