- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 88 for unlock (0.08 sec)
-
cmd/namespace-lock.go
timeout.LogSuccess(UTCNow().Sub(start)) return LockContext{ctx: newCtx, cancel: cancel}, nil } // Unlock - block until write lock is released. func (di *distLockInstance) Unlock(lc LockContext) { if lc.cancel != nil { lc.cancel() } di.rwMutex.Unlock(context.Background()) } // RLock - block until read lock is taken or timeout has occurred.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Sep 29 22:40:36 UTC 2024 - 9.2K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
mu := NewDRWMutex(ds, "test-runlock-panic-2") defer func() { if recover() == nil { t.Fatalf("read unlock of unlocked RWMutex did not panic") } mu.Unlock(context.Background()) // Unlock, so -test.count > 1 works }() mu.Lock(id, source) mu.RUnlock(context.Background()) } // Borrowed from rwmutex_test.go func benchmarkRWMutex(b *testing.B, localWork, writeRatio int) { b.ResetTimer()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Dec 24 03:49:07 UTC 2022 - 9.7K bytes - Viewed (0) -
internal/lsync/lrwmutex_test.go
} }() mu := NewLRWMutex() mu.RLock() mu.Unlock() } // Borrowed from rwmutex_test.go func TestRUnlockPanic(t *testing.T) { defer func() { if recover() == nil { t.Fatalf("read unlock of unlocked RWMutex did not panic") } }() mu := NewLRWMutex() mu.RUnlock() } // Borrowed from rwmutex_test.go func TestRUnlockPanic2(t *testing.T) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Mar 05 04:57:35 UTC 2023 - 7.9K bytes - Viewed (0) -
internal/lsync/lrwmutex.go
} } // RUnlock releases a read lock held on lm. // // It is a run-time error if lm is not locked on entry to RUnlock. func (lm *LRWMutex) RUnlock() { isWriteLock := false success := lm.unlock(isWriteLock) if !success { panic("Trying to RUnlock() while no RLock() is active") } } func (lm *LRWMutex) unlock(isWriteLock bool) (unlocked bool) { lm.mu.Lock()
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Sun Jan 02 17:15:06 UTC 2022 - 4.8K bytes - Viewed (0) -
cmd/lock-rest-client.go
} return ok, err } // RLock calls read lock REST API. func (c *lockRESTClient) RLock(ctx context.Context, args dsync.LockArgs) (reply bool, err error) { return c.call(ctx, lockRPCRLock, &args) } // Lock calls lock REST API. func (c *lockRESTClient) Lock(ctx context.Context, args dsync.LockArgs) (reply bool, err error) { return c.call(ctx, lockRPCLock, &args) } // RUnlock calls read unlock REST API.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jul 29 18:10:04 UTC 2024 - 3.3K bytes - Viewed (0) -
internal/dsync/locker.go
// Do read unlock for given LockArgs. It should return // * a boolean to indicate success/failure of the operation // * an error on failure of unlock request operation. // Canceling the context will abort the remote call. // In that case, the resource may or may not be unlocked. RUnlock(ctx context.Context, args LockArgs) (bool, error) // Do write unlock for given LockArgs. It should return
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jan 18 20:44:38 UTC 2022 - 2.7K 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) -
prepare_stmt.go
// 3. g1 tx exec insert, wait for unlock `conn.PrepareContext(ctx, query)` to finish tx and release. stmt, err := conn.PrepareContext(ctx, query) if err != nil { cacheStmt.prepareErr = err db.Mux.Lock() delete(db.Stmts, query) db.Mux.Unlock() return Stmt{}, err } db.Mux.Lock() cacheStmt.Stmt = stmt db.Mux.Unlock() return cacheStmt, nil }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 6.6K bytes - Viewed (0) -
internal/dsync/dsync-server_test.go
return reply, nil } func (l *lockServer) Unlock(args *LockArgs) (reply bool, err error) { if d := atomic.LoadInt64(&l.responseDelay); d != 0 { time.Sleep(time.Duration(d)) } l.mutex.Lock() defer l.mutex.Unlock() var locksHeld int64 if locksHeld, reply = l.lockMap[args.Resources[0]]; !reply { // No lock is held on the given name
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Jan 23 16:46:37 UTC 2023 - 8.3K bytes - Viewed (0) -
cmd/metacache-manager.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 25 00:44:15 UTC 2022 - 5.2K bytes - Viewed (0)