- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 810 for lock1 (0.09 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
checkMessage(expected, "LockC -> LockA", "LockB -> LockC", "LockA -> LockB"); } public void testReentrancy_noDeadlock() { lockA.lock(); lockB.lock(); lockA.lock(); // Should not assert on lockB -> reentrant(lockA) } public void testExplicitOrdering_noViolations() { lock1.lock(); lock3.lock(); lock3.unlock(); lock2.lock(); lock3.lock(); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 16.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
checkMessage(expected, "LockC -> LockA", "LockB -> LockC", "LockA -> LockB"); } public void testReentrancy_noDeadlock() { lockA.lock(); lockB.lock(); lockA.lock(); // Should not assert on lockB -> reentrant(lockA) } public void testExplicitOrdering_noViolations() { lock1.lock(); lock3.lock(); lock3.unlock(); lock2.lock(); lock3.lock(); }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 16.1K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/DefaultResourceLockCoordinationServiceTest.groovy
then: !lock1.lockedState !lock2.lockedState } def "can lock resources atomically with tryLock"() { def lock1 = resourceLock("lock1", lock1Locked) def lock2 = resourceLock("lock1", lock2Locked) when: def disposition = null coordinationService.withStateLock(new InternalTransformer<ResourceLockState.Disposition, ResourceLockState>() { @Override
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Apr 11 17:16:10 UTC 2024 - 15.4K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/work/DefaultWorkerLeaseServiceTest.groovy
when: workerLeaseService.withLocks([lock1, lock2]) { assert lock1.lockedState assert lock2.lockedState workerLeaseService.withoutLocks([lock1, lock2], runnable { assert !lock1.lockedState assert !lock2.lockedState assert !lock1.doIsLockedByCurrentThread() assert !lock2.doIsLockedByCurrentThread()
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Apr 05 16:29:26 UTC 2024 - 4.8K bytes - Viewed (0) -
platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/DefaultFileLockManagerContentionTest.groovy
} def "lock manager is notified while holding an exclusive lock when another lock manager in same process requires lock with mode #lockMode"() { given: def file = tmpDir.file("lock-file.bin") def action = Mock(Consumer) def lock = createLock(Exclusive, file, manager, action) when: def lock2 = createLock(lockMode, file, manager2) then:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue Apr 16 15:49:51 UTC 2024 - 5.2K bytes - Viewed (0) -
src/runtime/metrics_test.go
// to abstract over the relationship of two Lock calls or an RLock // and a Lock call. type locker2 interface { Lock1() Unlock1() Lock2() Unlock2() } type mutex struct { mu sync.Mutex } func (m *mutex) Lock1() { m.mu.Lock() } func (m *mutex) Unlock1() { m.mu.Unlock() } func (m *mutex) Lock2() { m.mu.Lock() } func (m *mutex) Unlock2() { m.mu.Unlock() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 17:52:17 UTC 2024 - 45K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
* * Lock lockA = factory1.newReentrantLock(MyLockOrder.FIRST); * Lock lockB = factory1.newReentrantLock(MyLockOrder.FIRST); * Lock lockC = factory2.newReentrantLock(MyLockOrder.FIRST); * * lockA.lock(); * * lockB.lock(); // will throw an IllegalStateException * lockC.lock(); // will throw an IllegalStateException * * lockA.lock(); // reentrant acquisition is okay * }</pre> *
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Dec 15 19:31:54 UTC 2023 - 35.9K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/CycleDetectingLockFactory.java
* * Lock lockA = factory1.newReentrantLock(MyLockOrder.FIRST); * Lock lockB = factory1.newReentrantLock(MyLockOrder.FIRST); * Lock lockC = factory2.newReentrantLock(MyLockOrder.FIRST); * * lockA.lock(); * * lockB.lock(); // will throw an IllegalStateException * lockC.lock(); // will throw an IllegalStateException * * lockA.lock(); // reentrant acquisition is okay * }</pre> *
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Fri Dec 15 19:31:54 UTC 2023 - 35.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/Locks.kt
import okhttp3.internal.http2.Http2Stream import okhttp3.internal.http2.Http2Writer /** * Centralisation of central locks according to docs/contribute/concurrency.md */ internal object Locks { inline fun <T> Dispatcher.withLock(action: () -> T): T { contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) } return lock.withLock(action) } inline fun <T> RealConnection.withLock(action: () -> T): T {
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 2.1K bytes - Viewed (0) -
platforms/core-runtime/base-services/src/test/groovy/org/gradle/internal/resources/SharedResourceLeaseRegistryTest.groovy
and: def lockA = sharedResourceLeaseRegistry.getResourceLock('resource-a') def lockB = sharedResourceLeaseRegistry.getResourceLock('resource-b') when: coordinationService.withStateLock(lock(lockA)) coordinationService.withStateLock(lock(lockB)) then: lockIsHeld(lockA) lockIsHeld(lockB) when:
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Sep 22 08:48:02 UTC 2023 - 5K bytes - Viewed (0)