src/java.base/share/classes/java/util/concurrent/locks/AbstractQueuedSynchronizer.java
equal
deleted
inserted
replaced
102 * integer maintaining state, so deserialized objects have empty |
102 * integer maintaining state, so deserialized objects have empty |
103 * thread queues. Typical subclasses requiring serializability will |
103 * thread queues. Typical subclasses requiring serializability will |
104 * define a {@code readObject} method that restores this to a known |
104 * define a {@code readObject} method that restores this to a known |
105 * initial state upon deserialization. |
105 * initial state upon deserialization. |
106 * |
106 * |
107 * <h3>Usage</h3> |
107 * <h2>Usage</h2> |
108 * |
108 * |
109 * <p>To use this class as the basis of a synchronizer, redefine the |
109 * <p>To use this class as the basis of a synchronizer, redefine the |
110 * following methods, as applicable, by inspecting and/or modifying |
110 * following methods, as applicable, by inspecting and/or modifying |
111 * the synchronization state using {@link #getState}, {@link |
111 * the synchronization state using {@link #getState}, {@link |
112 * #setState} and/or {@link #compareAndSetState}: |
112 * #setState} and/or {@link #compareAndSetState}: |
185 * not suffice, you can build synchronizers from a lower level using |
185 * not suffice, you can build synchronizers from a lower level using |
186 * {@link java.util.concurrent.atomic atomic} classes, your own custom |
186 * {@link java.util.concurrent.atomic atomic} classes, your own custom |
187 * {@link java.util.Queue} classes, and {@link LockSupport} blocking |
187 * {@link java.util.Queue} classes, and {@link LockSupport} blocking |
188 * support. |
188 * support. |
189 * |
189 * |
190 * <h3>Usage Examples</h3> |
190 * <h2>Usage Examples</h2> |
191 * |
191 * |
192 * <p>Here is a non-reentrant mutual exclusion lock class that uses |
192 * <p>Here is a non-reentrant mutual exclusion lock class that uses |
193 * the value zero to represent the unlocked state, and one to |
193 * the value zero to represent the unlocked state, and one to |
194 * represent the locked state. While a non-reentrant lock |
194 * represent the locked state. While a non-reentrant lock |
195 * does not strictly require recording of the current owner |
195 * does not strictly require recording of the current owner |