- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 170 for Unlock (0.17 sec)
-
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()
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Sun Jan 02 17:15:06 GMT 2022 - 4.8K 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
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Mon Jan 23 16:46:37 GMT 2023 - 8.3K 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()
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Sat Dec 24 03:49:07 GMT 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) {
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Sun Mar 05 04:57:35 GMT 2023 - 7.9K bytes - Viewed (0) -
internal/event/targetlist.go
list.statLock.Lock() defer list.statLock.Unlock() stats, ok := list.targetStats[id] if !ok { // should not happen return } stats.currentSendCalls-- list.targetStats[id] = stats return } func (list *TargetList) incFailedEvents(id TargetID) { list.statLock.Lock() defer list.statLock.Unlock() stats, ok := list.targetStats[id] if !ok {
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Tue Mar 19 07:30:10 GMT 2024 - 9.2K bytes - Viewed (0) -
internal/store/batch.go
func (b *Batch[K, T]) GetByKey(key K) (T, bool) { b.Lock() defer b.Unlock() item, ok := b.items[key] return item, ok } // Len returns the no of items in the batch func (b *Batch[K, T]) Len() int { b.Lock() defer b.Unlock() return len(b.keys) } // IsFull checks if the batch is full or not func (b *Batch[K, T]) IsFull() bool { b.Lock() defer b.Unlock() return b.isFull() }
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Sat Oct 07 15:07:38 GMT 2023 - 2.5K bytes - Viewed (0) -
internal/grid/muxclient.go
if responses == nil { return nil, errors.New("RequestStream: responses channel is nil") } m.init = true m.respMu.Lock() if m.closed { m.respMu.Unlock() return nil, ErrDisconnected } m.respWait = responses // Route directly to output. m.respMu.Unlock() // Try to grab an initial block. m.singleResp = false m.RecvSeq = m.SendSeq // Sync if cap(requests) > 0 {
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Wed Feb 28 18:05:18 GMT 2024 - 14.2K 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 {
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Mon Feb 19 22:54:46 GMT 2024 - 6K bytes - Viewed (0) -
cmd/lock-rest-client_test.go
// Attempt all calls. _, err = lkClient.RLock(context.Background(), dsync.LockArgs{}) if err == nil { t.Fatal("Expected for Rlock to fail") } _, err = lkClient.Lock(context.Background(), dsync.LockArgs{}) if err == nil { t.Fatal("Expected for Lock to fail") } _, err = lkClient.RUnlock(context.Background(), dsync.LockArgs{}) if err == nil { t.Fatal("Expected for RUnlock to fail") }
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Tue Nov 21 01:09:35 GMT 2023 - 2K bytes - Viewed (0) -
cmd/iam-store.go
type IAMStorageAPI interface { // The role of the read-write lock is to prevent go routines from // concurrently reading and writing the IAM storage. The (r)lock() // functions return the iamCache. The cache can be safely written to // only when returned by `lock()`. lock() *iamCache unlock() rlock() *iamCache runlock() getUsersSysType() UsersSysType
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Thu Mar 21 17:19:50 GMT 2024 - 73.2K bytes - Viewed (2)