Re: How to run tasks with priority?
- From: "George George via JavaKB.com" <forum@xxxxxxxxxx>
- Date: Thu, 02 Jun 2005 02:44:09 GMT
Thanks Boudewijn,
> It sounds like you need to use synchronization, not
> priorities. With synchronized{} blocks you can make
> threads wait for eachother at fixed points.
It is a very good idea! I am not quite familar with the technology you
mentioned. Could you please provide me a simple sample?
> If two threads have the same priority and execute the
> same code, adding a yield call to one of those, could
> make it run about twice as slow.
I am wondering why should I use yield to make one thread run slower than
another one. I think thread with equal priority should have the same chance
to run. What is your purpose of using yield?
regards,
George
--
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-setup/200506/1
.
- Follow-Ups:
- Re: How to run tasks with priority?
- From: Boudewijn Dijkstra
- Re: How to run tasks with priority?
- References:
- Re: How to run tasks with priority?
- From: George George via JavaKB.com
- Re: How to run tasks with priority?
- From: Boudewijn Dijkstra
- Re: How to run tasks with priority?
- Prev by Date: Re: applet paint() refresh problems
- Next by Date: Initialize variable
- Previous by thread: Re: How to run tasks with priority?
- Next by thread: Re: How to run tasks with priority?
- Index(es):
Relevant Pages
|