This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: user-space threads
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