...
Code Block | ||
---|---|---|
| ||
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.
...
...
Code Block | ||
---|---|---|
| ||
private volatile Boolean done; while (!this.done) { Thread.sleep(1000); } |
Depending Relying on the synchronization semantics of Thread.yield()
and Thread.sleep()
methods can cause unexpected behavior.
...