What is the difference between these two? In some places, the thread suspend still occupies a very high CPU, and it will not be occupied by changing to sleep;
In some places, I can use whatever I want.
Does anyone know why?
Simply put, suspend is to suspend your current thread, you can use resume to resume, but when you use sleep, you must wait until the time is up to resume, and sleep is to suspend your current process, not the current thread.
Interruput can be used to wake up during sleep, and the thread in sleep will throw an exception. Is this similar to resume?
What I want to ask is is there any difference between threads in sleep and suspend states?