- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 502 for Lock (0.03 sec)
-
internal/dsync/drwmutex.go
} } // Lock holds a write lock on dm. // // If the lock is already in use, the calling go routine // blocks until the mutex is available. func (dm *DRWMutex) Lock(id, source string) { isReadLock := false dm.lockBlocking(context.Background(), nil, id, source, isReadLock, Options{ Timeout: drwMutexInfinite, }) } // Options lock options. type Options struct {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 09 15:49:49 UTC 2024 - 20.4K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/DirectExecutorService.java
*/ @GuardedBy("lock") private int runningTasks = 0; @GuardedBy("lock") private boolean shutdown = false; @Override public void execute(Runnable command) { startTask(); try { command.run(); } finally { endTask(); } } @Override public boolean isShutdown() { synchronized (lock) { return shutdown; } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 3.5K bytes - Viewed (0) -
internal/lock/lock_solaris.go
Op: "open", Path: path, Err: syscall.EINVAL, } } lock := syscall.Flock_t{ Start: 0, Len: 0, Pid: 0, Type: lockType, Whence: 0, } f, err := os.OpenFile(path, flag, perm) if err != nil { return nil, err } if err = syscall.FcntlFlock(f.Fd(), rlockType, &lock); err != nil { f.Close() if err == syscall.EAGAIN { err = ErrAlreadyLocked }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 2.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/CycleDetectingLockFactoryTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.1K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/AbstractScheduledService.java
* always under a lock. */ private static final class SupplantableFuture implements Cancellable { private final ReentrantLock lock; @GuardedBy("lock") private Future<@Nullable Void> currentFuture; SupplantableFuture(ReentrantLock lock, Future<@Nullable Void> currentFuture) { this.lock = lock; this.currentFuture = currentFuture; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 25 16:22:21 UTC 2024 - 27.8K bytes - Viewed (0) -
internal/bucket/bandwidth/monitor.go
return } } } func (m *Monitor) updateMovingAvg() { m.mlock.Lock() defer m.mlock.Unlock() for _, bucketMeasurement := range m.bucketsMeasurement { bucketMeasurement.updateExponentialMovingAverage(time.Now()) } } func (m *Monitor) init(opts BucketOptions) { m.mlock.Lock() defer m.mlock.Unlock() _, ok := m.bucketsMeasurement[opts] if !ok {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Feb 19 22:54:46 UTC 2024 - 6K bytes - Viewed (0) -
cmd/local-locker_test.go
} toUnLock = toUnLock[:0] for k, v := range l.lockMap { for _, lock := range v { toUnLock = append(toUnLock, dsync.LockArgs{Resources: []string{k}, UID: lock.UID, Owner: lock.Owner}) } } start = time.Now() for _, lock := range toUnLock { ok, err := l.RUnlock(context.TODO(), lock) if err != nil || !ok { t.Fatal(err) } }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 11.9K 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
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Dec 15 19:31:54 UTC 2023 - 35.9K bytes - Viewed (0) -
internal/dsync/dsync_test.go
dm1st := NewDRWMutex(ds, "aap") dm2nd := NewDRWMutex(ds, "aap") dm1st.Lock(id, source) // Release lock after 10 seconds go func() { time.Sleep(5 * testDrwMutexAcquireTimeout) // fmt.Println("Unlocking dm1") dm1st.Unlock(context.Background()) }() dm2nd.Lock(id, source) // fmt.Printf("2nd lock obtained after 1st lock is released\n") time.Sleep(testDrwMutexRefreshCallTimeout * 2)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 19 14:35:19 UTC 2024 - 11.1K bytes - Viewed (0)