ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166e/StampedLock.java
(Generate patch)

Comparing jsr166/src/jsr166e/StampedLock.java (file contents):
Revision 1.20 by dl, Mon Oct 15 14:02:34 2012 UTC vs.
Revision 1.22 by jsr166, Wed Oct 17 00:02:47 2012 UTC

# Line 63 | Line 63 | import java.util.concurrent.TimeUnit;
63   *
64   * <p>StampedLocks are designed for use as internal utilities in the
65   * development of thread-safe components. Their use relies on
66 < * knowledge of the internal properties of the the data, objects, and
66 > * knowledge of the internal properties of the data, objects, and
67   * methods they are protecting.  They are not reentrant, so locked
68   * bodies should not call other unknown methods that may try to
69   * re-acquire locks (although you may pass a stamp to other methods
# Line 226 | Line 226 | public class StampedLock implements java
226       * threads.  Both await methods use a similar spin strategy: If
227       * the associated queue appears to be empty, then the thread
228       * spin-waits up to SPINS times (where each iteration decreases
229 <     * spin count with 50% probablility) before enqueing, and then, if
229 >     * spin count with 50% probability) before enqueing, and then, if
230       * it is the first thread to be enqueued, spins again up to SPINS
231       * times before blocking. If, upon wakening it fails to obtain
232       * lock, and is still (or becomes) the first waiting thread (which

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines