After Java1.5, condition decomposes the object monitor method (Wait, notify, notifyall) into distinct objects so that they can be combined with any lock implementation to provide multiple wait sets (Wait-set) for each pair of images. Period, lock replaces the use of synchronized methods and statements, condition replaces the OBJETC monitor method and uses.
When the thread is in a frozen state, it is possible that the thread will not end, and interrupt is used to clear the frozen state of the thread. This is required to purge the frozen state when there is no specified way to get the frozen state of the thread back to the running state. Forces the thread to revert to the running state. This makes it possible to manipulate the tag to end the thread.
Daemon Thread:
Setdaemon (True) is used to turn a thread into a daemon (user thread, background thread) when the running thread is a daemon thread, and the Java Virtual machine is launched.
The method must be called before the thread is started.
Join:
Join () robs the CPU of executive power. Wait for the thread to end.
Priority level:
The frequency of the grab CPU resources, the thread default level is 5, the thread level range is 1-10.
setpriority (int newpriority) sets the thread level. Parentheses can also be written in thread.max_priority, thread.min_priority ...
Yield
Pause Current thread
——————————————————————————
The content of this section, later in-depth re-fill the
Java: Multi-threaded < four > Lock, stop thread, daemon thread, join, priority &yield