Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: i decided i liked "notification" better than "notify signal".

...

To guarantee liveness, the while loop condition must be tested before invoking the wait() method. This is in case another thread has already satisfied the condition predicate and sent a notification. Invoking the wait() method after the notify signal notification has been sent results in indefinite blocking.

...