user-space threads

Adam Megacz gcj@lists.megacz.com
Thu Oct 24 12:12:00 GMT 2002


Mark Wielaard <mark@klomp.org> writes:
> I believe the java thread model does not guarantee any scheduling system
> at all. Not even that threads that block on I/O make other threads run.

Wow, I just checked the JLS, and you're right.  This is amazing.  It
doesn't even require the conventional "scheduler must not starve a
runnable thread forever" assumption.

Wow.  I consider that a major omission.  A lot of people write code
that implicitly relies upon that assumption -- for example, a lot of
crypto libraries generate randomness by spinning a thread in a while
loop and then flipping a boolean to break the thread out of the loop.

  - a

-- 
"Through your rags I see your vanity"  -- Socrates



More information about the Java mailing list