Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 61 for Unlock (0.17 sec)

  1. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Nov 24 17:07:14 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  2. 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 Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 28 08:47:39 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  3. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 6K bytes
    - Viewed (0)
  4. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  5. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 2K bytes
    - Viewed (0)
  6. internal/store/queuestore.go

    func (store *QueueStore[_]) Del(key string) error {
    	store.Lock()
    	defer store.Unlock()
    	return store.del(key)
    }
    
    // DelList - Deletes a list of entries from the store.
    // Returns an error even if one key fails to be deleted.
    func (store *QueueStore[_]) DelList(keys []string) error {
    	store.Lock()
    	defer store.Unlock()
    
    	for _, key := range keys {
    		if err := store.del(key); err != nil {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 25 16:44:20 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  7. cmd/site-replication-utils.go

    						}()
    					}
    				}
    				wg.Wait()
    				sm.Unlock()
    			}
    			sTimer.Reset(siteResyncSaveInterval)
    		case <-ctx.Done():
    			return
    		}
    	}
    }
    
    // update overall site resync state
    func (sm *siteResyncMetrics) updateState(s SiteResyncStatus) error {
    	if !globalSiteReplicationSys.isEnabled() {
    		return nil
    	}
    	sm.Lock()
    	defer sm.Unlock()
    	switch s.Status {
    	case ResyncStarted:
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.9K bytes
    - Viewed (1)
  8. internal/pubsub/pubsub.go

    	}
    	ps.Lock()
    	defer ps.Unlock()
    
    	sub := &Sub[T]{ch: subCh, types: Mask(mask.Mask()), filter: filter}
    	ps.subs = append(ps.subs, sub)
    
    	// We hold a lock, so we are safe to update
    	combined := Mask(atomic.LoadUint64(&ps.types))
    	combined.Merge(Mask(mask.Mask()))
    	atomic.StoreUint64(&ps.types, uint64(combined))
    
    	go func() {
    		<-doneCh
    
    		ps.Lock()
    		defer ps.Unlock()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Feb 06 16:57:30 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  9. cni/pkg/nodeagent/pod_cache.go

    func (p *podNetnsCache) Get(uid string) Netns {
    	// lock current snapshot pod map
    	p.mu.RLock()
    	defer p.mu.RUnlock()
    	if info, f := p.currentPodCache[uid]; f {
    		return info.Netns
    	}
    	return nil
    }
    
    // make sure uid is in the cache, even if we don't have a netns
    func (p *podNetnsCache) Ensure(uid string) {
    	p.mu.Lock()
    	defer p.mu.Unlock()
    	if _, ok := p.currentPodCache[uid]; !ok {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  10. internal/cachevalue/cache.go

    		if t.updating.TryLock() {
    			go func() {
    				defer t.updating.Unlock()
    				t.update()
    			}()
    		}
    		return v.v, v.e
    	}
    
    	// Get lock. Either we get it or we wait for it.
    	t.updating.Lock()
    	if time.Since(time.UnixMilli(t.lastUpdateMs.Load())) < ttl {
    		// There is a new value, release lock and return it.
    		v = t.valErr.Load()
    		t.updating.Unlock()
    		return v.v, v.e
    	}
    	t.update()
    	v = t.valErr.Load()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 16:00:42 GMT 2024
    - 4.2K bytes
    - Viewed (0)
Back to top