[SunHELP] java thread priorities

sunhelp at sunhelp.org sunhelp at sunhelp.org
Sun Dec 2 15:23:22 CST 2001


Hi Joe!

> This is a bit off topic but does anyone know if there's a way to alter java
> thread scheduling priorities? I'm looking for a way to "renice" the thread
> priority assuming it's even possible. Rumour has it that it can be done from
> the java command line and looking at the help it would appear that the -D
> switch is the primary suspect. As you can tell my knowledge of java extends
> to it being an island off the coast of Sumatra. Any pointers gratefully
> received.

Have a look at the java API documentation of java.lang.Thread

start from

http://java.sun.com/j2se/1.3/docs/api/index.html

and navigate to java.lang.Thread

Each thread has a priority field that can be read using
int Thread.getPriority() and can be written using
Thread.setPriority(int).

good luck,
michael

-- 

--------------------------------------------------
Michael Wirz
Hermannstrasse 6
64342 Seeheim

Tel.: 06257 962073

<michael.wirz at epost.de>
--------------------------------------------------



More information about the SunHELP mailing list