Java: yield() x sleep()

inicial › Forums › Java › Java: yield() x sleep()

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2292616
    matheusdba
    Keymaster

    What is the difference between yield() and sleep() methods?

    #2292617
    matheusdba
    Keymaster

    When a task invokes its yield() method, it returns to the ready state. When a task invokes its sleep() method, it returns to the waiting state.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.