/libcore/luni/src/main/java/java/util/ |
H A D | TimerTask.java | 29 final Object lock = new Object(); field in class:TimerTask 51 synchronized (lock) { 60 synchronized (lock) { 72 synchronized (lock) { 92 synchronized (lock) { 107 synchronized (lock) {
|
/libcore/luni/src/main/java/java/util/concurrent/ |
H A D | DelayQueue.java | 46 private transient final ReentrantLock lock = new ReentrantLock(); field in class:DelayQueue 72 private final Condition available = lock.newCondition(); 110 final ReentrantLock lock = this.lock; 111 lock.lock(); 120 lock.unlock(); 157 final ReentrantLock lock = this.lock; 158 lock [all...] |
H A D | LinkedBlockingDeque.java | 51 * single lock and using conditions to manage blocking. 125 /** Main lock guarding all access */ 126 final ReentrantLock lock = new ReentrantLock(); field in class:LinkedBlockingDeque 129 private final Condition notEmpty = lock.newCondition(); 132 private final Condition notFull = lock.newCondition(); 165 final ReentrantLock lock = this.lock; 166 lock.lock(); // Never contended, but necessary for visibility 175 lock [all...] |
H A D | CyclicBarrier.java | 110 * using the barrier - due to the non-deterministic way the lock 121 /** The lock for guarding barrier entry */ 122 private final ReentrantLock lock = new ReentrantLock(); field in class:CyclicBarrier 124 private final Condition trip = lock.newCondition(); 141 * Called only while holding lock. 153 * Called only while holding lock. 167 final ReentrantLock lock = this.lock; 168 lock.lock(); [all...] |
H A D | ArrayBlockingQueue.java | 79 /** Main lock guarding all access */ 80 final ReentrantLock lock; field in class:ArrayBlockingQueue 131 * Call only when holding lock. 134 // assert lock.getHoldCount() == 1; 144 * Call only when holding lock. 147 // assert lock.getHoldCount() == 1; 163 * Call only when holding lock. 166 // assert lock.getHoldCount() == 1; 225 lock = new ReentrantLock(fair); 226 notEmpty = lock [all...] |
H A D | PriorityBlockingQueue.java | 74 * operations protected with a single lock. However, allocation 76 * holding main lock) in order to allow takes to operate 79 * build-up. The need to back away from lock during allocation 81 * java.util.PriorityQueue operations within a lock, as was done 125 private final ReentrantLock lock; field in class:PriorityBlockingQueue 182 this.lock = new ReentrantLock(); 183 this.notEmpty = lock.newCondition(); 205 this.lock = new ReentrantLock(); 206 this.notEmpty = lock.newCondition(); 242 * holding lock [all...] |
H A D | ScheduledThreadPoolExecutor.java | 809 private final ReentrantLock lock = new ReentrantLock(); field in class:ScheduledThreadPoolExecutor.DelayedWorkQueue 834 private final Condition available = lock.newCondition(); 846 * Call only when holding lock. 864 * Call only when holding lock. 885 * Resize the heap array. Call only when holding lock. 916 final ReentrantLock lock = this.lock; 917 lock.lock(); 921 lock [all...] |
/libcore/luni/src/main/java/java/io/ |
H A D | FilterReader.java | 56 synchronized (lock) { 79 synchronized (lock) { 96 synchronized (lock) { 113 synchronized (lock) { 138 synchronized (lock) { 156 synchronized (lock) { 176 synchronized (lock) { 196 synchronized (lock) {
|
H A D | LineNumberReader.java | 68 synchronized (lock) { 91 synchronized (lock) { 116 synchronized (lock) { 158 synchronized (lock) { 194 synchronized (lock) { 221 synchronized (lock) { 239 synchronized (lock) { 265 synchronized (lock) {
|
H A D | Reader.java | 43 protected Object lock; field in class:Reader 50 lock = this; 54 * Constructs a new {@code Reader} with {@code lock} used to synchronize 57 * @param lock 60 * if {@code lock} is {@code null}. 62 protected Reader(Object lock) { argument 63 if (lock == null) { 64 throw new NullPointerException("lock == null"); 66 this.lock = lock; [all...] |
H A D | Writer.java | 41 protected Object lock; field in class:Writer 48 lock = this; 52 * Constructs a new {@code Writer} with {@code lock} used to synchronize 55 * @param lock 58 * if {@code lock} is {@code null}. 60 protected Writer(Object lock) { argument 61 if (lock == null) { 62 throw new NullPointerException("lock == null"); 64 this.lock = lock; [all...] |
H A D | FilterWriter.java | 57 synchronized (lock) { 71 synchronized (lock) { 91 synchronized (lock) { 107 synchronized (lock) { 128 synchronized (lock) {
|
H A D | StringReader.java | 89 synchronized (lock) { 124 synchronized (lock) { 156 synchronized (lock) { 185 synchronized (lock) { 204 synchronized (lock) { 232 synchronized (lock) {
|
H A D | CharArrayWriter.java | 45 * {@code lock} to synchronize access to this writer. 49 lock = buf; 55 * as the {@code lock} to synchronize access to this writer. 67 lock = buf; 104 synchronized (lock) { 117 synchronized (lock) { 130 synchronized (lock) { 146 synchronized (lock) { 168 synchronized (lock) { 185 synchronized (lock) { [all...] |
H A D | CharArrayReader.java | 102 synchronized (lock) { 140 synchronized (lock) { 177 synchronized (lock) { 211 synchronized (lock) { 237 synchronized (lock) { 254 synchronized (lock) { 271 synchronized (lock) {
|
H A D | PushbackReader.java | 85 synchronized (lock) { 137 synchronized (lock) { 184 synchronized (lock) { 231 synchronized (lock) { 305 synchronized (lock) { 332 synchronized (lock) { 356 synchronized (lock) {
|
H A D | BufferedReader.java | 110 synchronized (lock) { 195 synchronized (lock) { 235 synchronized (lock) { 273 synchronized (lock) { 351 synchronized (lock) { 439 synchronized (lock) { 457 synchronized (lock) { 489 synchronized (lock) {
|
H A D | StringWriter.java | 37 * StringBuffer} is also the {@code lock} used to synchronize access to this 42 lock = buf; 48 * StringBuffer} is also the {@code lock} used to synchronize access to this 59 lock = buf;
|
H A D | BufferedWriter.java | 84 synchronized (lock) { 121 synchronized (lock) { 185 synchronized (lock) { 233 synchronized (lock) { 265 synchronized (lock) {
|
/libcore/support/src/test/java/tests/support/ |
H A D | Support_StringWriter.java | 29 * <code>lock</code> used to synchronize access to this Writer. 34 lock = buf; 40 * the <code>lock</code> used to synchronize access to this Writer. 45 lock = buf; 79 synchronized (lock) { 93 synchronized (lock) { 117 synchronized (lock) { 136 synchronized (lock) { 151 synchronized (lock) { 174 synchronized (lock) { [all...] |
H A D | Support_StringReader.java | 54 synchronized (lock) { 82 synchronized (lock) { 119 synchronized (lock) { 152 synchronized (lock) { 187 synchronized (lock) { 206 synchronized (lock) { 229 synchronized (lock) {
|
/libcore/luni/src/main/java/java/util/concurrent/locks/ |
H A D | Lock.java | 17 * <p>A lock is a tool for controlling access to a shared resource by 18 * multiple threads. Commonly, a lock provides exclusive access to a 19 * shared resource: only one thread at a time can acquire the lock and 20 * all access to the shared resource requires that the lock be 22 * a shared resource, such as the read lock of a {@link ReadWriteLock}. 25 * access to the implicit monitor lock associated with every object, but 26 * forces all lock acquisition and release to occur in a block-structured way: 38 * acquire the lock of node A, then node B, then release A and acquire 41 * allowing a lock to be acquired and released in different scopes, 53 * l.lock(); 154 void lock(); method in interface:Lock [all...] |
/libcore/luni/src/test/java/libcore/java/lang/ |
H A D | OldAndroidMonitorTest.java | 150 /* Before interrupting, grab the waiter lock, which 295 private static void deepWait(int depth, Object lock) { argument 296 synchronized (lock) { 298 deepWait(depth - 1, lock); 303 lock.wait(); 313 Object lock; field in class:OldAndroidMonitorTest.Worker 316 Worker(int id, Object lock) { argument 319 this.lock = lock; 326 OldAndroidMonitorTest.deepWait(id, lock); [all...] |
/libcore/luni/src/main/native/ |
H A D | AsynchronousSocketCloseMonitor.cpp | 61 ScopedPthreadMutexLock lock(&blockedThreadListMutex); 71 ScopedPthreadMutexLock lock(&blockedThreadListMutex); 85 ScopedPthreadMutexLock lock(&blockedThreadListMutex);
|
/libcore/luni/src/main/java/java/nio/channels/ |
H A D | FileChannel.java | 55 * <li>lock ranges of bytes associated with the file,</li> 159 * Obtains an exclusive lock on this file. 161 * This is a convenience method for acquiring a maximum length lock on a 163 * {@code fileChannel.lock(0L, Long.MAX_VALUE, false);} 165 * @return the lock object representing the locked file area. 171 * either a lock is already held that overlaps this lock 172 * request, or another thread is waiting to acquire a lock that 176 * the lock. 179 * to acquire the lock 184 public final FileLock lock() throws IOException { method in class:FileChannel 250 public abstract FileLock lock(long position, long size, boolean shared) method in class:FileChannel [all...] |