Re: How to run tasks with priority?



Thanks Boudewijn,

Your reply is very helpful! I found that if I use priority feature of Java
thread, then I can only have (MAX_PRIORITY - MIN_PRIORITY) different
priorities, which may limit my application. I am wondering whether there
are any alternate solutions which may have more different priorities.

> You can accomplish this behaviour with the Thread#yield
> () method.

How can I utilize utilize yield? Could you please give me a simple sample?


regards,
George

--
Message posted via http://www.javakb.com
.



Relevant Pages

  • Re: How to run tasks with priority?
    ... I found that if I use priority feature of Java ... > are any alternate solutions which may have more different priorities. ... It sounds like you need to use synchronization, ... > How can I utilize utilize yield? ...
    (comp.lang.java.help)
  • Re: Software suggestions
    ... Java enthusiasts seem to believe that it's closing the speed gap, but I tend to agree that C/C++ produces faster running programs. ... You're right that academics have different priorities. ... Java is more buttoned-down than C++, which allows the compiler to spot errors on my part that a C++ compiler would consider valid code. ...
    (comp.constraints)