In java, will context switching happen when thread is changing its state?
I've googled a lot of sites, but did't find any article mentioned about this.
so if anyone can help would be appreciated.
like this:
doSomething();
//when Thread.sleep() is called, thread state will change from runnable to timed_waiting, so will context switching happen?
Thread.sleep(1000);