mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
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> |