Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 99 for Unlock (0.26 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/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)
  3. cmd/metacache-walk.go

    			return ctx.Err()
    		}
    		if opts.Limit > 0 && objsReturned >= opts.Limit {
    			return nil
    		}
    
    		if s.walkMu != nil {
    			s.walkMu.Lock()
    		}
    		entries, err := s.ListDir(ctx, "", opts.Bucket, current, -1)
    		if s.walkMu != nil {
    			s.walkMu.Unlock()
    		}
    		if err != nil {
    			// Folder could have gone away in-between
    			if err != errVolumeNotFound && err != errFileNotFound {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  4. 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)
  5. cmd/metacache-set.go

    					cancel()
    					exit = true
    				}
    			}
    			metaMu.Unlock()
    		}
    	}()
    
    	const retryDelay = 200 * time.Millisecond
    	const maxTries = 5
    
    	// Keep destination...
    	// Write results to disk.
    	bw := newMetacacheBlockWriter(entries, func(b *metacacheBlock) error {
    		// if the block is 0 bytes and its a first block skip it.
    		// skip only this for Transient caches.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 26 19:52:52 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  6. cmd/batch-handlers.go

    	if ri == nil {
    		return
    	}
    
    	ri.mu.Lock()
    	defer ri.mu.Unlock()
    
    	ri.Bucket = bucket
    	ri.Object = info.Name
    	ri.countItem(info.Size, info.DeleteMarker, success)
    }
    
    func (ri *batchJobInfo) trackCurrentBucketBatch(bucket string, batch []ObjectInfo) {
    	if ri == nil {
    		return
    	}
    
    	ri.mu.Lock()
    	defer ri.mu.Unlock()
    
    	ri.Bucket = bucket
    	for i := range batch {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 08 14:11:38 GMT 2024
    - 55.2K bytes
    - Viewed (0)
  7. 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 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  8. cmd/http-stats.go

    	if stats == nil {
    		return
    	}
    	stats.Lock()
    	defer stats.Unlock()
    	if stats.apiStats == nil {
    		stats.apiStats = make(map[string]int)
    	}
    	stats.apiStats[api]++
    }
    
    // Dec increments the api stats counter.
    func (stats *HTTPAPIStats) Dec(api string) {
    	if stats == nil {
    		return
    	}
    	stats.Lock()
    	defer stats.Unlock()
    	if val, ok := stats.apiStats[api]; ok && val > 0 {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 11.4K bytes
    - Viewed (0)
  9. cmd/background-newdisks-heal-ops.go

    	h.mu.RLock()
    	defer h.mu.RUnlock()
    
    	return h.Object
    }
    
    func (h *healingTracker) setObject(object string) {
    	h.mu.Lock()
    	defer h.mu.Unlock()
    
    	h.Object = object
    }
    
    func (h *healingTracker) updateProgress(success, skipped bool, bytes uint64) {
    	h.mu.Lock()
    	defer h.mu.Unlock()
    
    	switch {
    	case success:
    		h.ItemsHealed++
    		h.BytesDone += bytes
    	case skipped:
    		h.ItemsSkipped++
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 14.7K bytes
    - Viewed (0)
  10. 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)
Back to top