February 2014
Beginner
1248 pages
62h 25m
English
Every Java thread has a thread priority that helps determine the order in which threads are scheduled. Each new thread inherits the priority of the thread that created it. Informally, higher-priority threads are more important to a program and should be allocated processor time before lower-priority threads. Nevertheless, thread priorities cannot guarantee the order in which threads execute.
It’s recommended that you do not explicitly create and use Thread objects to implement concurrency, but rather use the Executor interface (which is described in Section 23.3). The Thread class does contain some useful static methods, which you will use later in the chapter.
Most operating systems support timeslicing, ...
Read now
Unlock full access