Multiple choice technology programming languages

Thread.yield() might cause the thread, to move to which state.

  1. waiting state

  2. ready state

  3. sleeping state

  4. none

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Thread.yield() is a hint to the thread scheduler that the current thread is willing to yield its current use of the processor. The scheduler may choose to move the thread from running state to ready state, but this is not guaranteed - it's entirely up to the scheduler's discretion.