Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 154 for Unlock (0.21 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 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 19.7K bytes
    - Viewed (0)
  2. 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 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  3. 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 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 28 18:04:17 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  4. internal/dsync/drwmutex_test.go

    	mu := NewDRWMutex(ds, "test-runlock-panic-2")
    	defer func() {
    		if recover() == nil {
    			t.Fatalf("read unlock of unlocked RWMutex did not panic")
    		}
    		mu.Unlock(context.Background()) // Unlock, so -test.count > 1 works
    	}()
    	mu.Lock(id, source)
    	mu.RUnlock(context.Background())
    }
    
    // Borrowed from rwmutex_test.go
    func benchmarkRWMutex(b *testing.B, localWork, writeRatio int) {
    	b.ResetTimer()
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  5. internal/lsync/lrwmutex_test.go

    		}
    	}()
    	mu := NewLRWMutex()
    	mu.RLock()
    	mu.Unlock()
    }
    
    // Borrowed from rwmutex_test.go
    func TestRUnlockPanic(t *testing.T) {
    	defer func() {
    		if recover() == nil {
    			t.Fatalf("read unlock of unlocked RWMutex did not panic")
    		}
    	}()
    	mu := NewLRWMutex()
    	mu.RUnlock()
    }
    
    // Borrowed from rwmutex_test.go
    func TestRUnlockPanic2(t *testing.T) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Mar 05 04:57:35 GMT 2023
    - 7.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 21 19:28:08 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 6K bytes
    - Viewed (0)
  7. cmd/namespace-lock.go

    	}
    	timeout.LogSuccess(UTCNow().Sub(start))
    	return LockContext{ctx: newCtx, cancel: cancel}, nil
    }
    
    // Unlock - block until write lock is released.
    func (di *distLockInstance) Unlock(lc LockContext) {
    	if lc.cancel != nil {
    		lc.cancel()
    	}
    	di.rwMutex.Unlock(lc.ctx)
    }
    
    // RLock - block until read lock is taken or timeout has occurred.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Jun 05 23:56:35 GMT 2023
    - 9.2K bytes
    - Viewed (0)
  8. 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 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.4K bytes
    - Viewed (0)
  9. 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 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 18 04:42:11 GMT 2024
    - 30.4K bytes
    - Viewed (0)
  10. 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 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 08 14:11:38 GMT 2024
    - 55.2K bytes
    - Viewed (0)
Back to top