Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 117 for Unlock (0.19 sec)

  1. 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 Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  2. cmd/admin-heal-ops.go

    func (ahs *allHealState) setDiskHealingStatus(ep Endpoint, healing bool) {
    	ahs.Lock()
    	defer ahs.Unlock()
    
    	ahs.healLocalDisks[ep] = healing
    }
    
    func (ahs *allHealState) pushHealLocalDisks(healLocalDisks ...Endpoint) {
    	ahs.Lock()
    	defer ahs.Unlock()
    
    	for _, ep := range healLocalDisks {
    		ahs.healLocalDisks[ep] = false
    	}
    }
    
    func (ahs *allHealState) periodicHealSeqsClean(ctx context.Context) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.1K bytes
    - Viewed (1)
  3. cmd/bucket-replication-stats.go

    	if r == nil {
    		return
    	}
    
    	r.Lock()
    	defer r.Unlock()
    	delete(r.Cache, bucket)
    }
    
    // UpdateReplicaStat updates in-memory replica statistics with new values.
    func (r *ReplicationStats) UpdateReplicaStat(bucket string, n int64) {
    	if r == nil {
    		return
    	}
    
    	r.Lock()
    	defer r.Unlock()
    	bs, ok := r.Cache[bucket]
    	if !ok {
    		bs = newBucketReplicationStats()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.4K bytes
    - Viewed (0)
  4. internal/grid/connection.go

    		}
    		cancel(ErrDisconnected)
    		c.connChange.L.Lock()
    		if atomic.CompareAndSwapUint32((*uint32)(&c.state), StateConnected, StateConnectionError) {
    			c.connChange.Broadcast()
    		}
    		c.disconnected()
    		c.connChange.L.Unlock()
    
    		conn.Close()
    		c.handleMsgWg.Done()
    	}()
    
    	c.connMu.Lock()
    	connPingInterval := c.connPingInterval
    	c.connMu.Unlock()
    	ping := time.NewTicker(connPingInterval)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 42.6K bytes
    - Viewed (0)
  5. 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)
  6. cmd/bucket-metadata-sys.go

    		buckets = buckets[count:]
    	}
    
    	sys.Lock()
    	sys.initialized = true
    	sys.Unlock()
    
    	if globalIsDistErasure {
    		go sys.refreshBucketsMetadataLoop(ctx, failedBuckets)
    	}
    }
    
    // Reset the state of the BucketMetadataSys.
    func (sys *BucketMetadataSys) Reset() {
    	sys.Lock()
    	for k := range sys.metadataMap {
    		delete(sys.metadataMap, k)
    	}
    	sys.Unlock()
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  7. 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)
  8. cmd/perf-tests.go

    	activeConnections uint64
    	sync.RWMutex
    }
    
    func (n *netPerfRX) Connect() {
    	n.Lock()
    	defer n.Unlock()
    	n.activeConnections++
    	atomic.StoreUint64(&n.RX, 0)
    	n.lastToConnect = time.Now()
    }
    
    func (n *netPerfRX) Disconnect() {
    	n.Lock()
    	defer n.Unlock()
    	n.activeConnections--
    	if n.firstToDisconnect.IsZero() {
    		n.RXSample = atomic.LoadUint64(&n.RX)
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top