...
Notifying a single thread rather than all waiting threads can violate the liveness property of the system.
Rule | Severity | Likelihood |
|---|
Detectable | Repairable | Priority | Level |
|---|---|---|---|
THI02-J | Low | Unlikely | No |
Yes | P2 | L3 |
Automated Detection
| Tool | Version | Checker | Description |
|---|
| Parasoft Jtest |
|
|
|
| CERT. |
| THI02. |
FB.MT_CORRECTNESS.NO_NOTIFY_NOT_NOTIFYALL
| ANF | Do not use 'notify()'; use 'notifyAll()' instead so that all waiting threads will be notified | ||||||
| SonarQube |
|
Using notify() rather than notifyAll()
| S2446 |
| "notifyAll" should be used |
Related Guidelines
Bibliography
...
...