How to suspend and resume the thread RRS feed

  • Question

  • Hi,
    I need to check if there exists a high priority thread then suspend the currently executing thread and perform that high priority thread first and after it finish, resume the suspended one.

    How to do that.
    Saturday, December 19, 2009 11:28 AM


  • thread1.Suspend();
    while(thread2.IsAlive())/*do nothing*/;

    With best regards, Yasser Zamani
    • Marked as answer by eryang Friday, December 25, 2009 3:13 AM
    Saturday, December 19, 2009 1:55 PM