The method that installs line Cheng first step in using a program is very simple, change this line Cheng in the SetPriority method that line Cheng boy or girl friend can call after establishing line Cheng target run first step, can call GetPriority method to get the first step of current line Cheng likewise.
More special in Java line Cheng is to be called to guard (Daemon) the Cheng of low level line of line Cheng. This line Cheng has first step of lowest, the other object in be being used at be a system and line Cheng provide a service. The means that is setting of a subscribers feeder Cheng guardianship line Cheng is the SetDaemon method that line Cheng boy or girl friend calls before online Cheng object is founded. Case of typical guardianship line Cheng is the systematic natural resources in JVM reclaims automatically line Cheng, it moves in elementary and other state from beginning to end, be used in real time monitoring and administrative system can reclaim resource.
Line Cheng manages in group
Java defined the line Cheng group in multi-line Cheng moving system (ThreadGroup) object, use at coming true to undertake to line Cheng according to specific function type manages in group centralized. The every line Cheng that the user founds all belongs to group of some line Cheng, when online Cheng is founded, group of this line Cheng can be appointed, in the line Cheng team that also need not appoint line Cheng group to acquiesce in order to make this line Cheng is in. But, once line Cheng joins group of some line Cheng, this line Cheng all the time consist in in group of this line Cheng till line Cheng dies, cannot the line Cheng group that place of Cheng of halfway change line belongs to.
When the Application application process of Java moves, JVM founds a name to be the line Cheng group of Main. Unless be appointed alone, in this line that in using a program, establishs Cheng Jun belongs to group of Main line Cheng. The line Cheng group that can establish other name in group of Main line Cheng joins other line Cheng group of this line Cheng in, the rest may be deduced by analogy, make the tree between line Cheng and line Cheng group management and successive impact.
As similar as line Cheng, can be aimed at what object of line Cheng group has line Cheng group to attemper, state government and first step setting. In undertaking administrative a course to line Cheng group, the target that all line Cheng in joining group of some line Cheng all is regarded to unite.
6, brief summary:
The multi-line Cheng strategy of the property that the article is aimed at Cheng of Java platform central line and applied process undertook analyse and explaining.
Differ with environment of other operating system, the process that the line Cheng in Java moving environment is similar to environment of operating system of much user, much task to fall, but in process and line Cheng move reach found the respect such as means, process and Java line Cheng have clear distinction.
Previous 1 2 3 4 5 6 78 Next