| /external/cronet/base/task/common/ |
| D | checked_lock_unittest.cc | 23 // Acquire()/Release() don't crash. 37 lock_->Acquire(); in Run() 42 lock_->Acquire(); in Run() 74 lock_->Acquire(); in Run() 95 lock.Acquire(); in TEST() 100 lock.Acquire(); in TEST() 106 lock.Acquire(); in TEST() 121 predecessor.Acquire(); in TEST() 122 lock.Acquire(); in TEST() 134 lock.Acquire(); in TEST() [all …]
|
| /external/guava/guava-tests/test/com/google/common/util/concurrent/ |
| D | RateLimiterTest.java | 53 limiter.acquire(); // R0.00, since it's the first request in testSimple() 54 limiter.acquire(); // R0.20 in testSimple() 55 limiter.acquire(); // R0.20 in testSimple() 61 assertTrue("Unable to acquire initial permit", r.tryAcquire()); in testImmediateTryAcquire() 67 assertTrue("Unable to acquire initial permit", r.tryAcquire()); in testDoubleMinValueCanAcquireExactlyOnce() 94 limiter.acquire(0); in testAcquireParameterValidation() 99 limiter.acquire(-1); in testAcquireParameterValidation() 127 limiter.acquire(); // R0.00 in testSimpleWithWait() 129 limiter.acquire(); // R0.00, ...which is granted immediately in testSimpleWithWait() 130 limiter.acquire(); // R0.20 in testSimpleWithWait() [all …]
|
| /external/guava/android/guava-tests/test/com/google/common/util/concurrent/ |
| D | RateLimiterTest.java | 53 limiter.acquire(); // R0.00, since it's the first request in testSimple() 54 limiter.acquire(); // R0.20 in testSimple() 55 limiter.acquire(); // R0.20 in testSimple() 61 assertTrue("Unable to acquire initial permit", r.tryAcquire()); in testImmediateTryAcquire() 67 assertTrue("Unable to acquire initial permit", r.tryAcquire()); in testDoubleMinValueCanAcquireExactlyOnce() 94 limiter.acquire(0); in testAcquireParameterValidation() 99 limiter.acquire(-1); in testAcquireParameterValidation() 127 limiter.acquire(); // R0.00 in testSimpleWithWait() 129 limiter.acquire(); // R0.00, ...which is granted immediately in testSimpleWithWait() 130 limiter.acquire(); // R0.20 in testSimpleWithWait() [all …]
|
| /external/rust/crates/tokio/src/sync/tests/ |
| D | semaphore_batch.rs | 13 assert_ready_ok!(task::spawn(s.acquire(1)).poll()); in poll_acquire_one_available() 23 assert_ready_ok!(task::spawn(s.acquire(5)).poll()); in poll_acquire_many_available() 26 assert_ready_ok!(task::spawn(s.acquire(5)).poll()); in poll_acquire_many_available() 58 // Acquire the first permit in poll_acquire_one_unavailable() 59 assert_ready_ok!(task::spawn(s.acquire(1)).poll()); in poll_acquire_one_unavailable() 62 let mut acquire_2 = task::spawn(s.acquire(1)); in poll_acquire_one_unavailable() 63 // Try to acquire the second permit in poll_acquire_one_unavailable() 82 // Acquire the first permit in poll_acquire_many_unavailable() 83 assert_ready_ok!(task::spawn(s.acquire(1)).poll()); in poll_acquire_many_unavailable() 86 // Try to acquire the second permit in poll_acquire_many_unavailable() [all …]
|
| D | loom_semaphore_batch.rs | 24 shared.semaphore.acquire(1).await.unwrap(); in basic_usage() 59 block_on(semaphore.acquire(1)).unwrap(); in release() 64 block_on(semaphore.acquire(1)).unwrap(); in release() 82 block_on(semaphore.acquire(1)).map_err(|_| ())?; in basic_closing() 106 block_on(semaphore.acquire(1)).map_err(|_| ())?; in concurrent_close() 119 let mut acquire1 = Some(semaphore.acquire(1)); in concurrent_cancel() 120 let mut acquire2 = Some(semaphore.acquire(1)); in concurrent_cancel() 122 // poll the acquire future once, and then immediately throw in concurrent_cancel() 125 if let Some(acquire) = acquire1.take() { in concurrent_cancel() 126 pin!(acquire); in concurrent_cancel() [all …]
|
| /external/python/cpython2/Lib/test/ |
| D | lock_tests.py | 81 lock.acquire() 86 lock.acquire() 92 self.assertTrue(lock.acquire(False)) 97 lock.acquire() 100 result.append(lock.acquire(False)) 107 lock.acquire() 110 lock.acquire() 124 lock.acquire() 142 lock.acquire() 161 lock.acquire() [all …]
|
| /external/libchrome/base/task_scheduler/ |
| D | scheduler_lock_unittest.cc | 23 // Acquire()/Release() don't crash. 36 lock_->Acquire(); in Run() 41 lock_->Acquire(); in Run() 75 lock_->Acquire(); in Run() 96 lock.Acquire(); in TEST() 101 lock.Acquire(); in TEST() 107 lock.Acquire(); in TEST() 122 predecessor.Acquire(); in TEST() 123 lock.Acquire(); in TEST() 132 lock.Acquire(); in TEST() [all …]
|
| /external/python/cpython3/Lib/test/ |
| D | lock_tests.py | 109 lock.acquire() 115 lock.acquire() 120 lock.acquire() 126 self.assertTrue(lock.acquire(False)) 131 lock.acquire() 134 result.append(lock.acquire(False)) 141 lock.acquire() 144 lock.acquire() 158 lock.acquire() 176 lock.acquire() [all …]
|
| D | test_threadsignals.py | 47 signalled_all.acquire() 49 signalled_all.acquire() 96 lock.acquire() 99 self.assertRaises(KeyboardInterrupt, lock.acquire, timeout=5) 102 # We want to assert that lock.acquire() was interrupted because 104 # after timeout return of lock.acquire() (which can fool assertRaises). 130 rlock.acquire() 134 # Wait until we can't acquire it without blocking... 135 while rlock.acquire(blocking=False): 140 self.assertRaises(KeyboardInterrupt, rlock.acquire, timeout=5) [all …]
|
| /external/llvm/test/CodeGen/X86/ |
| D | atomic6432.ll | 8 %t1 = atomicrmw add i64* @sc64, i64 1 acquire 13 %t2 = atomicrmw add i64* @sc64, i64 3 acquire 18 %t3 = atomicrmw add i64* @sc64, i64 5 acquire 23 %t4 = atomicrmw add i64* @sc64, i64 %t3 acquire 34 %t1 = atomicrmw sub i64* @sc64, i64 1 acquire 39 %t2 = atomicrmw sub i64* @sc64, i64 3 acquire 44 %t3 = atomicrmw sub i64* @sc64, i64 5 acquire 49 %t4 = atomicrmw sub i64* @sc64, i64 %t3 acquire 60 %t1 = atomicrmw and i64* @sc64, i64 3 acquire 65 %t2 = atomicrmw and i64* @sc64, i64 4294967297 acquire [all …]
|
| D | atomic64.ll | 9 %t1 = atomicrmw add i64* @sc64, i64 1 acquire 12 %t2 = atomicrmw add i64* @sc64, i64 3 acquire 15 %t3 = atomicrmw add i64* @sc64, i64 5 acquire 18 %t4 = atomicrmw add i64* @sc64, i64 %t3 acquire 28 %t1 = atomicrmw sub i64* @sc64, i64 1 acquire 31 %t2 = atomicrmw sub i64* @sc64, i64 3 acquire 34 %t3 = atomicrmw sub i64* @sc64, i64 5 acquire 37 %t4 = atomicrmw sub i64* @sc64, i64 %t3 acquire 47 %t1 = atomicrmw and i64* @sc64, i64 3 acquire 50 %t2 = atomicrmw and i64* @sc64, i64 5 acquire [all …]
|
| D | atomic8.ll | 11 %t1 = atomicrmw add i8* @sc8, i8 1 acquire 16 %t2 = atomicrmw add i8* @sc8, i8 3 acquire 21 %t3 = atomicrmw add i8* @sc8, i8 5 acquire 26 %t4 = atomicrmw add i8* @sc8, i8 %t3 acquire 39 %t1 = atomicrmw sub i8* @sc8, i8 1 acquire 44 %t2 = atomicrmw sub i8* @sc8, i8 3 acquire 49 %t3 = atomicrmw sub i8* @sc8, i8 5 acquire 54 %t4 = atomicrmw sub i8* @sc8, i8 %t3 acquire 67 %t1 = atomicrmw and i8* @sc8, i8 3 acquire 72 %t2 = atomicrmw and i8* @sc8, i8 5 acquire [all …]
|
| D | atomic32.ll | 11 %t1 = atomicrmw add i32* @sc32, i32 1 acquire 14 %t2 = atomicrmw add i32* @sc32, i32 3 acquire 17 %t3 = atomicrmw add i32* @sc32, i32 5 acquire 20 %t4 = atomicrmw add i32* @sc32, i32 %t3 acquire 29 %t1 = atomicrmw sub i32* @sc32, i32 1 acquire 32 %t2 = atomicrmw sub i32* @sc32, i32 3 acquire 35 %t3 = atomicrmw sub i32* @sc32, i32 5 acquire 38 %t4 = atomicrmw sub i32* @sc32, i32 %t3 acquire 47 %t1 = atomicrmw and i32* @sc32, i32 3 acquire 50 %t2 = atomicrmw and i32* @sc32, i32 5 acquire [all …]
|
| D | atomic16.ll | 11 %t1 = atomicrmw add i16* @sc16, i16 1 acquire 16 %t2 = atomicrmw add i16* @sc16, i16 3 acquire 21 %t3 = atomicrmw add i16* @sc16, i16 5 acquire 26 %t4 = atomicrmw add i16* @sc16, i16 %t3 acquire 39 %t1 = atomicrmw sub i16* @sc16, i16 1 acquire 44 %t2 = atomicrmw sub i16* @sc16, i16 3 acquire 49 %t3 = atomicrmw sub i16* @sc16, i16 5 acquire 54 %t4 = atomicrmw sub i16* @sc16, i16 %t3 acquire 67 %t1 = atomicrmw and i16* @sc16, i16 3 acquire 72 %t2 = atomicrmw and i16* @sc16, i16 5 acquire [all …]
|
| /external/pigweed/pw_sync/ |
| D | inline_borrowable_test.cc | 80 EXPECT_TRUE(trivial.acquire()->yes()); in TEST() 85 EXPECT_EQ(custom.acquire()->data(), std::make_pair(1, -1)); in TEST() 91 EXPECT_EQ(custom.acquire()->data(), std::make_pair(x, -x)); in TEST() 96 EXPECT_EQ(custom.acquire()->data(), std::make_pair(1, 2)); in TEST() 101 EXPECT_EQ(custom.acquire()->data(), std::make_pair(1, 2)); in TEST() 106 EXPECT_EQ(custom.acquire()->data(), std::make_pair(1, 2)); in TEST() 116 EXPECT_EQ(custom.acquire()->data(), std::make_pair(1, 2)); in TEST() 122 EXPECT_TRUE(trivial_interrupt_safe.acquire()->yes()); in TEST() 128 EXPECT_EQ(custom_interrupt_safe.acquire()->data(), std::make_pair(1, 2)); in TEST() 134 EXPECT_EQ(custom_mutex.acquire()->data(), std::make_pair(1, 2)); in TEST() [all …]
|
| /external/python/cpython2/Lib/multiprocessing/ |
| D | synchronize.py | 85 self.acquire = self._semlock.acquire 221 self.acquire = self._lock.acquire 234 'must acquire() condition before using wait()' 246 self._wait_semaphore.acquire(True, timeout) 253 self._lock.acquire() 257 assert not self._wait_semaphore.acquire(False) 261 while self._woken_count.acquire(False): 262 res = self._sleeping_count.acquire(False) 265 if self._sleeping_count.acquire(False): # try grabbing a sleeper 267 self._woken_count.acquire() # wait for the sleeper to wake [all …]
|
| /external/python/cpython3/Lib/test/test_asyncio/ |
| D | test_locks.py | 29 await lock.acquire() 97 self.assertTrue(await lock.acquire()) 100 if await lock.acquire(): 105 if await lock.acquire(): 110 if await lock.acquire(): 146 self.assertTrue(await lock.acquire()) 148 task = asyncio.create_task(lock.acquire()) 157 # - B is blocked in acquire() 158 # - C is blocked in acquire() 172 await lock.acquire() [all …]
|
| /external/pigweed/pw_software_update/ |
| D | bundled_update_service.cc | 52 BorrowedStatus borrowed_status = status_.acquire(); \ 65 response = *status_.acquire(); in GetStatus() 74 const BundledUpdateState state = status_.acquire()->state; in Start() 80 response = *status_.acquire(); in Start() 85 BorrowedStatus borrowed_status = status_.acquire(); in Start() 97 response = *status_.acquire(); in Start() 108 response = *status_.acquire(); in Start() 114 BorrowedStatus borrowed_status = status_.acquire(); in Start() 135 const BundledUpdateState state = status_.acquire()->state; in SetTransferred() 144 response = *status_.acquire(); in SetTransferred() [all …]
|
| D | bundled_update_service_pwpb.cc | 50 BorrowedStatus borrowed_status = status_.acquire(); \ 63 response = *status_.acquire(); in GetStatus() 71 const BundledUpdateState::Enum state = status_.acquire()->state; in Start() 77 response = *status_.acquire(); in Start() 82 BorrowedStatus borrowed_status = status_.acquire(); in Start() 95 response = *status_.acquire(); in Start() 105 response = *status_.acquire(); in Start() 111 BorrowedStatus borrowed_status = status_.acquire(); in Start() 125 const BundledUpdateState::Enum state = status_.acquire()->state; in SetTransferred() 134 response = *status_.acquire(); in SetTransferred() [all …]
|
| /external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/sync/ |
| D | SemaphoreTest.kt | 20 semaphore.acquire() in <lambda>() 21 semaphore.acquire() in <lambda>() 23 semaphore.acquire() in <lambda>() 33 semaphore.acquire() // suspends in <lambda>() 39 semaphore.acquire() // locked in <lambda>() 75 semaphore.acquire() in <lambda>() 77 // first to acquire in <lambda>() 79 semaphore.acquire() // suspend in <lambda>() 83 // second to acquire in <lambda>() 85 semaphore.acquire() // suspend in <lambda>() [all …]
|
| /external/python/cpython2/Demo/threads/ |
| D | sync.py | 23 # .acquire() 24 # acquire the lock associated with the condition 58 # condition object can (must) be .acquire'ed and .release'ed directly. 87 # condition.acquire() 92 # # did a .wait, *and* acquire the lock again before .wait 109 # condition.acquire() 133 # B_done.acquire() B_done.acquire(); B_done.release() 138 # Because B_done was in the acquire'd state at the time B was spawned, 139 # B's attempt to acquire B_done can't succeed until A has done its 275 # the lock actually used by .acquire() and .release() [all …]
|
| /external/python/cpython2/Demo/metaclasses/ |
| D | Synch.py | 19 of times it has been acquired by the same thread. Each acquire() 29 A thread intending to acquire both locks should acquire __wait 49 def acquire(self, flag=1): member in Lock 50 """Acquire the lock. 53 when it cannot acquire the __wait lock without blocking (it 54 may still block for a little while in order to acquire the 61 self.__mutex.acquire() 68 locked = self.__wait.acquire(flag) 72 self.__mutex.acquire() 87 Only allow another thread to acquire the lock when the count [all …]
|
| /external/llvm/test/MC/ARM/ |
| D | load-store-acquire-release-v8.s | 12 @ CHECK-V7: instruction requires: acquire/release 13 @ CHECK-V7: instruction requires: acquire/release 14 @ CHECK-V7: instruction requires: acquire/release 15 @ CHECK-V7: instruction requires: acquire/release 25 @ CHECK-V7: instruction requires: acquire/release 26 @ CHECK-V7: instruction requires: acquire/release 27 @ CHECK-V7: instruction requires: acquire/release 28 @ CHECK-V7: instruction requires: acquire/release 36 @ CHECK-V7: instruction requires: acquire/release 37 @ CHECK-V7: instruction requires: acquire/release [all …]
|
| D | load-store-acquire-release-v8-thumb.s | 12 @ CHECK-V7: error: instruction requires: acquire/release 13 @ CHECK-V7: error: instruction requires: acquire/release 14 @ CHECK-V7: error: instruction requires: acquire/release 15 @ CHECK-V7: error: instruction requires: acquire/release 25 @ CHECK-V7: error: instruction requires: acquire/release 26 @ CHECK-V7: error: instruction requires: acquire/release 27 @ CHECK-V7: error: instruction requires: acquire/release 28 @ CHECK-V7: error: instruction requires: acquire/release 36 @ CHECK-V7: error: instruction requires: acquire/release 37 @ CHECK-V7: error: instruction requires: acquire/release [all …]
|
| /external/apache-commons-lang/src/main/java/org/apache/commons/lang3/concurrent/ |
| D | TimedSemaphore.java | 33 * Using the {@link #acquire()} method a permit can be requested by a thread. 37 * {@link #acquire()} and the available permits are already exhausted for this 40 * that they can try to acquire a new permit. This basically means that in the 68 * semaphore.acquire(); // limit database load 101 * {@link #acquire()} method in each processing step. {@link TimedSemaphore} 102 * keeps track of the number of invocations of the {@link #acquire()} method and 108 * An alternative to {@code acquire()} is the {@link #tryAcquire()} method. This 126 * switched off: in this mode the {@link #acquire()} method never blocks, but 134 * resources. After that {@link #acquire()} must not be called any more. 165 /** Stores the total number of invocations of the acquire() method. */ [all …]
|