Java does not provide for preemption of a thread with the same
priority. If you run one thread in a tight loop then you can
never be sure the other one will get to run.
Mo DeJong
[EMAIL PROTECTED]
On Wed, 24 Feb 1999, Chris Raser wrote:
>
> Greetings all! I've got a little problem with the handling of
> threads on my machine. (I'm using RH5.1 w/ your jdk117)
>
> I'm finding that, given two threads of the same priority, the one
> that's currently getting CPU time will starve the other one until an
> explicit yield() or sleep() is reached. Is there any way to fix this?
>
> I've got a reasonably elegant workaround, but it's a workaround
> nonetheless, and I'm reluctant to make it a standard part of my code. (As
> I'll have to do in order to ensure that my code will work on all three of
> the platforms that it will be running on.)
>
> Any help or insights you guys can offer would be appreciated.
> Thanks!
>
> -chris
>
> *******************************************************************************
> The most important thing in the programming language is the name. A
> language will not succeed without a good name. I have recently invented a
> very good name and now I am looking for a suitable language.
> -- D. E. Knuth, 1967
> *******************************************************************************
>
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]