The run Thread ()

      . / * Run * the What by Will BE / 
      Private Runnable target;
if the thread passed a Runnable run object when created, the object's run method is called
1
/ ** 2 * Constructed a using the If the this the Thread WAS A separate 3 * <code> Runnable </ code> RUN Object, the then that 4 * <code> Runnable </ code> Object's <code> RUN </ code> Method, IS Called;
otherwise, do nothing and return
5 * otherwise, the this Method, and Returns Nothing does. . 6 * <P>
    the Thread subclasses should override this method
. 7 * subclasses of <code> the Thread </ code> should the override the this method. 8 * 9 * @see #start() 10 * @see #stop() 11 * @see #Thread(ThreadGroup, Runnable, String) 12 */ 13 @Override 14 public void run() { 15 if (target != null) { 16 target.run(); 17 } 18 }

 

Guess you like

Origin www.cnblogs.com/xiaofan156/p/11774365.html