Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 151 for Unlock (0.2 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 14 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K 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 14 09:35:11 GMT 2024
    - Last Modified: Thu Mar 28 08:47:39 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  3. cmd/bucket-metadata-sys.go

    func (sys *BucketMetadataSys) Count() int {
    	sys.RLock()
    	defer sys.RUnlock()
    
    	return len(sys.metadataMap)
    }
    
    // Remove bucket metadata from memory.
    func (sys *BucketMetadataSys) Remove(buckets ...string) {
    	sys.Lock()
    	for _, bucket := range buckets {
    		delete(sys.metadataMap, bucket)
    		globalBucketMonitor.DeleteBucket(bucket)
    	}
    	sys.Unlock()
    }
    
    Go
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  4. 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 Apr 14 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  5. cmd/bucket-targets.go

    	sys.aMutex.Lock()
    	defer sys.aMutex.Unlock()
    	if v, ok := sys.arnErrsMap[arn]; !ok {
    		sys.arnErrsMap[arn] = arnErrs{
    			updateInProgress: true,
    			count:            v.count + 1,
    			bucket:           bucket,
    		}
    	}
    }
    
    func (sys *BucketTargetSys) markRefreshDone(bucket, arn string) {
    	sys.aMutex.Lock()
    	defer sys.aMutex.Unlock()
    	if v, ok := sys.arnErrsMap[arn]; ok {
    Go
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  6. 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 14 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 6K bytes
    - Viewed (0)
  7. cmd/erasure-server-pool-rebalance.go

    			ok = true
    		}
    	}
    	if ok {
    		lock := z.serverPools[0].NewNSLock(minioMetaBucket, rebalMetaName)
    		lkCtx, err := lock.GetLock(ctx, globalOperationTimeout)
    		if err != nil {
    			rebalanceLogIf(ctx, fmt.Errorf("failed to acquire write lock on %s/%s: %w", minioMetaBucket, rebalMetaName, err))
    			return err
    		}
    		defer lock.Unlock(lkCtx)
    
    		ctx = lkCtx.Context()
    
    Go
    - Registered: Sun Apr 14 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 26.5K 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 14 19:28:10 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  9. 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 14 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.1K bytes
    - Viewed (1)
  10. 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 07 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 9.2K bytes
    - Viewed (0)
Back to top