- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 167 for Unlock (0.26 sec)
-
internal/dsync/drwmutex.go
} // Unlock unlocks the write lock. // // It is a run-time error if dm is not locked on entry to Unlock. func (dm *DRWMutex) Unlock(ctx context.Context) { dm.m.Lock() dm.cancelRefresh() dm.m.Unlock() restClnts, owner := dm.clnt.GetLockers() // create temp array on stack locks := make([]string, len(restClnts)) { dm.m.Lock() defer dm.m.Unlock()
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Thu Feb 22 06:26:06 GMT 2024 - 19.7K 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.
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Fri Nov 24 17:07:14 GMT 2023 - 3.3K bytes - Viewed (0) -
prepare_stmt.go
} return nil, ErrInvalidDB } func (db *PreparedStmtDB) Close() { db.Mux.Lock() defer db.Mux.Unlock() for _, query := range db.PreparedSQL { if stmt, ok := db.Stmts[query]; ok { delete(db.Stmts, query) go stmt.Close() } } } func (sdb *PreparedStmtDB) Reset() { sdb.Mux.Lock() defer sdb.Mux.Unlock() for _, stmt := range sdb.Stmts { go stmt.Close() }
Go - Registered: Sun Mar 24 09:35:10 GMT 2024 - Last Modified: Wed Mar 20 11:47:20 GMT 2024 - 6.1K 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) -
cmd/local-locker.go
} func (l *localLocker) RUnlock(_ context.Context, args dsync.LockArgs) (reply bool, err error) { if len(args.Resources) > 1 { return false, fmt.Errorf("internal error: localLocker.RUnlock called with more than one resource") } l.mutex.Lock() defer l.mutex.Unlock() var lri []lockRequesterInfo resource := args.Resources[0] if lri, reply = l.lockMap[resource]; !reply { // No lock is held on the given name
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Mon Feb 19 22:54:46 GMT 2024 - 10.6K bytes - Viewed (0) -
internal/grid/grid.go
m.mu.Lock() v, ok := m.m[id] m.mu.Unlock() return v, ok } func (m *lockedClientMap) LoadAndDelete(id uint64) (*muxClient, bool) { m.mu.Lock() v, ok := m.m[id] if ok { delete(m.m, id) } m.mu.Unlock() return v, ok } func (m *lockedClientMap) Size() int { m.mu.Lock() v := len(m.m) m.mu.Unlock() return v }
Go - Registered: Sun Mar 24 19:28:08 GMT 2024 - Last Modified: Wed Feb 21 15:49:34 GMT 2024 - 6.3K 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)