What is Suspend and Resume in Threading

Q

What is Suspend and Resume in Threading ?

✍: Guest

A

It is Similar to Sleep and Interrupt. Suspend allows you to block a thread until another thread calls Thread.Resume. The difference between Sleep and Suspend is that the latter does not immediately place a thread in the wait state. The thread does not suspend until the .NET runtime determines that it is in a safe place to suspend it. Sleep will immediately place a thread in a wait state.

2007-10-22, 4609👍, 0💬