C # multithreaded parallel programming - Lesson

1. Thread Life Cycle Management

  • Start, Suspend, Resume, Interrupt, About, Join (when using the Thread is very much)
  1. Start: Start a thread. (Equivalent to begin)
  2. Supspend: The thread has been suspended. (Equivalent to pause)
  3. Resume: resume a suspended thread. (Equivalent to continue)
  4. Interrupt: Interrupt threads are WaitSleepJoin thread state. (Corresponding to continue effect)
  5. About: Calling this method usually terminates the thread (equivalent to break effect)
  6. Join: calling thread waits for the child thread execution was carried out after the completion of

There is a small Demo link: https://pan.baidu.com/s/1CVcFQ3hhR1aOivhbdF8fYw extraction code: x5dk 

 

 

 

    

  

Guess you like

Origin www.cnblogs.com/2828sea/p/11016329.html