Back to Intellij Community

GroovyWaitCallNotInLoop

plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyWaitCallNotInLoop.html

2025.3-rc-2232 B
Original Source

Reports calls to wait() not made inside a loop.

wait() is normally used to suspend a thread until a condition is true, and that condition should be checked after the wait() returns. A loop is the clearest way to achieve this.