Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The java.util.concurrent utilities (interface Condition) provide the signal() and signalAll() methods to awaken waiting threads that are blocked on an await() call. Like the notify() method, the signal() method wakes up any one of the threads that is waiting on the condition and consequently, may be insecure. Similarly, any Java object that is blocked using wait() when used as a condition queue, should be notified using notifyAll().

Noncompliant Code Example (notify())

...