< prev index next >
src/java.base/share/classes/java/util/concurrent/locks/LockSupport.java
Print this page
8211283: Miscellaneous changes imported from jsr166 CVS 2018-11
Reviewed-by: martin, chegar
@@ -197,14 +197,15 @@
/**
* Disables the current thread for thread scheduling purposes, for up to
* the specified waiting time, unless the permit is available.
*
- * <p>If the permit is available then it is consumed and the call
- * returns immediately; otherwise the current thread becomes disabled
- * for thread scheduling purposes and lies dormant until one of four
- * things happens:
+ * <p>If the specified waiting time is zero or negative, the
+ * method does nothing. Otherwise, if the permit is available then
+ * it is consumed and the call returns immediately; otherwise the
+ * current thread becomes disabled for thread scheduling purposes
+ * and lies dormant until one of four things happens:
*
* <ul>
* <li>Some other thread invokes {@link #unpark unpark} with the
* current thread as the target; or
*
@@ -325,14 +326,15 @@
/**
* Disables the current thread for thread scheduling purposes, for up to
* the specified waiting time, unless the permit is available.
*
- * <p>If the permit is available then it is consumed and the call
- * returns immediately; otherwise the current thread becomes disabled
- * for thread scheduling purposes and lies dormant until one of four
- * things happens:
+ * <p>If the specified waiting time is zero or negative, the
+ * method does nothing. Otherwise, if the permit is available then
+ * it is consumed and the call returns immediately; otherwise the
+ * current thread becomes disabled for thread scheduling purposes
+ * and lies dormant until one of four things happens:
*
* <ul>
* <li>Some other thread invokes {@link #unpark unpark} with the
* current thread as the target; or
*
< prev index next >