- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 476 for locks (0.14 sec)
-
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 {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 2.1K 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> *
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri Dec 15 19:31:54 GMT 2023 - 35.9K bytes - Viewed (0) -
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(); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.1K bytes - Viewed (1) -
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(); }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/StripedTest.java
import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.Semaphore; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; import junit.framework.TestCase; /** * Tests for Striped. * * @author Dimitris Andreou */
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 8.4K bytes - Viewed (0) -
cmd/local-locker_test.go
rng := rand.New(rand.NewSource(0)) // Numbers of unique locks for _, locks := range []int{100, 1000, 1e6} { if testing.Short() && locks > 100 { continue } t.Run(fmt.Sprintf("%d-locks", locks), func(t *testing.T) { // Number of readers per lock... for _, readers := range []int{1, 10, 100} { if locks > 1000 && readers > 1 { continue }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Sun Mar 05 04:57:35 GMT 2023 - 11.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/Striped.java
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 10 20:55:18 GMT 2023 - 20.3K bytes - Viewed (1) -
internal/dsync/drwmutex.go
case <-ctx.Done(): return false default: // Try to acquire the lock. if locked = lock(ctx, dm.clnt, &locks, id, source, isReadLock, tolerance, quorum, dm.Names...); locked { dm.m.Lock() // If success, copy array to object if isReadLock { copy(dm.readLocks, locks) } else { copy(dm.writeLocks, locks) } dm.m.Unlock()
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 19.7K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/TestThread.java
* method equivalent to {@link * java.util.concurrent.locks.ReentrantLock#hasWaiters(java.util.concurrent.locks.Condition)}, * except that the method parameter must accept whatever condition-like object is passed into {@code * callAndAssertWaits} by the test. * * @param <L> the type of the lock-like object to be used * @author Justin T. Sampson */
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Apr 26 20:07:17 GMT 2023 - 10.9K bytes - Viewed (0) -
cmd/lock-rest-server.go
dst.Code = dsync.RespErr dst.Err = err.Error() } return dst, nil } const ( // Lock maintenance interval. lockMaintenanceInterval = 1 * time.Minute // Lock validity duration lockValidityDuration = 1 * time.Minute ) // lockMaintenance loops over all locks and discards locks // that have not been refreshed for some time. func lockMaintenance(ctx context.Context) {
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Tue Nov 21 01:09:35 GMT 2023 - 5.9K bytes - Viewed (0)