Relates :
|
If a very long timeout is passed to a blocking method (such as java.util.concurrent.LinkedBlockingQueue.poll) that ultimately uses LockSupport.park, the park call returns immediately instead of suspending the thread. Because park is allowed to return spuriously, the calling code always loops checking the condition it was waiting for and recalling park. This results in a busy-wait loop as the method constantly recalls park, which keeps returning immediately.
|