mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-29 18:17:08 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
19 lines
519 B
HTML
19 lines
519 B
HTML
<html>
|
|
<body>
|
|
Reports calls to <code>java.lang.Thread.sleep()</code> methods that occur
|
|
within a <code>synchronized</code> block or method.
|
|
<p>
|
|
<code>sleep()</code> within a
|
|
<code>synchronized</code> block may result in decreased performance, poor scalability, and possibly
|
|
even deadlocking. Consider using <code>wait()</code> instead,
|
|
as it will release the lock held.
|
|
</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
synchronized (lock) {
|
|
Thread.sleep(100);
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
</body>
|
|
</html> |