Re: How to run tasks with priority?
- From: "George George via JavaKB.com" <forum@xxxxxxxxxx>
- Date: Fri, 03 Jun 2005 03:20:43 GMT
Thanks Boudewijn,
Your sample is very helpful. But I think there is an issue in your sample,
which is that we must hardcode the number of sections that a code block
will be divided into. For example, in your sample, you hardcoded that Task1
is divided into 3 sections. I am wondering whether there are any approaches
which can flexibly define the number of sections in which a thread will be
divided into.
> To make the thread give away it's cycle to other
> threads with the same priority. In other words, to
> reduce the execution time without reducing the
> priority.
Are there any practical uses that we should give away it's cycle to other
threads with the same priority? Should we do it in this approach (yield)
manually or simply let JVM to do this.
Have a nice weekend,
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?
- 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: "Could not find a valid Java virtual machine"
- Next by Date: result set in jsp
- Previous by thread: Re: How to run tasks with priority?
- Next by thread: Re: How to run tasks with priority?
- Index(es):
Relevant Pages
|