Inspectopedia
 
2024.3

Call to 'Thread.yield()'

Warning
New
Last modified: 03 December 2024

Reports calls to Thread.yield().

The behavior of yield() is non-deterministic and platform-dependent, and it is rarely appropriate to use this method. Its use should be combined with detailed profiling and benchmarking to ensure that it actually has the desired effect.

Example: