Versions Compared

Key

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

...

Code Block
bgColor#ccccff
private volatile Boolean done;
while (!this.done) {
  Thread.sleep(1000);
}

Risk Assessment

Depending Relying on the synchronization semantics of Thread.yield() and Thread.sleep() methods can cause unexpected behavior.

...