Basic HTML version of Foils prepared Sept 21 1998

Foil 9 Thread Priorities and Groups

From Java Tutorial 98- 4: Multi-Treading, Useful Java Classes, I/O and Networking NAVO Tutorial -- Sept 23 1998. by Geoffrey C. Fox, Nancy McCracken


Every thread has a priority, which can be set by the user with setPriority( int ) using constants MIN_PRIORITY (1), MAX_PRIORITY(10), or NORM_PRIORITY.
Whenever the thread scheduler picks a thread to run, it picks the highest priority thread that is currently runnable. (If there is more than one thread with the same priority, each thread gets a turn in some order.)
The user can also create a ThreadGroup to organize a large number of threads by functionality. The methods stop(), suspend(), and resume() can be used on a ThreadGroup.



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998