Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 195 for RUnlock (0.19 sec)

  1. internal/kms/kes.go

    func (c *kesClient) Metrics(ctx context.Context) (kes.Metric, error) {
    	c.lock.RLock()
    	defer c.lock.RUnlock()
    
    	return c.client.Metrics(ctx)
    }
    
    // Version retrieves version information
    func (c *kesClient) Version(ctx context.Context) (string, error) {
    	c.lock.RLock()
    	defer c.lock.RUnlock()
    
    	return c.client.Version(ctx)
    }
    
    // APIs retrieves a list of supported API endpoints
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 16 15:43:39 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  2. 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 28 19:28:10 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  3. internal/config/lambda/event/targetlist.go

    }
    
    // Empty returns true if targetList is empty.
    func (list *TargetList) Empty() bool {
    	list.RLock()
    	defer list.RUnlock()
    
    	return len(list.targets) == 0
    }
    
    // List - returns available target IDs.
    func (list *TargetList) List(region string) []ARN {
    	list.RLock()
    	defer list.RUnlock()
    
    	keys := make([]ARN, 0, len(list.targets))
    	for k := range list.targets {
    		keys = append(keys, k.ToARN(region))
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Mar 07 16:12:41 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  4. internal/dsync/drwmutex.go

    		time.Sleep(time.Duration(dm.rng.Float64() * float64(dm.lockRetryMinInterval)))
    	}
    }
    
    // RUnlock releases a read lock held on dm.
    //
    // It is a run-time error if dm is not locked on entry to RUnlock.
    func (dm *DRWMutex) RUnlock(ctx context.Context) {
    	dm.m.Lock()
    	dm.cancelRefresh()
    	dm.m.Unlock()
    
    	restClnts, owner := dm.clnt.GetLockers()
    	// create temp array on stack
    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)
  5. internal/lsync/lrwmutex_test.go

    	if m.GetRLock(ctx, "", "", time.Second) {
    		clocked <- true
    		<-cunlock
    		m.RUnlock()
    		cdone <- true
    	}
    }
    
    // Borrowed from rwmutex_test.go
    func doTestParallelReaders(numReaders, gomaxprocs int) {
    	runtime.GOMAXPROCS(gomaxprocs)
    	m := NewLRWMutex()
    
    	clocked := make(chan bool)
    	cunlock := make(chan bool)
    	cdone := make(chan bool)
    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. cmd/handler-api.go

    }
    
    func (t *apiConfig) odirectEnabled() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.enableODirect
    }
    
    func (t *apiConfig) shouldGzipObjects() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.gzipObjects
    }
    
    func (t *apiConfig) permitRootAccess() bool {
    	t.mu.RLock()
    	defer t.mu.RUnlock()
    
    	return t.rootAccess
    }
    
    func (t *apiConfig) getListQuorum() string {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 08 09:22:27 GMT 2024
    - 10K bytes
    - Viewed (0)
  7. cmd/bucket-targets.go

    	sys.hMutex.RLock()
    	defer sys.hMutex.RUnlock()
    	if h, ok := sys.hc[ep.Host]; ok {
    		return !h.Online
    	}
    	go sys.initHC(ep)
    	return false
    }
    
    // markOffline sets endpoint to offline if network i/o timeout seen.
    func (sys *BucketTargetSys) markOffline(ep *url.URL) {
    	sys.hMutex.Lock()
    	defer sys.hMutex.Unlock()
    	if h, ok := sys.hc[ep.Host]; ok {
    		h.Online = false
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  8. internal/config/browser/browser.go

    func (browseCfg *Config) GetCSPolicy() string {
    	configLock.RLock()
    	defer configLock.RUnlock()
    	return browseCfg.CSPPolicy
    }
    
    // GetHSTSSeconds - Get the Content security Policy
    func (browseCfg *Config) GetHSTSSeconds() int {
    	configLock.RLock()
    	defer configLock.RUnlock()
    	return browseCfg.HSTSSeconds
    }
    
    // IsHSTSIncludeSubdomains - is HSTS 'includeSubdomains' directive enabled
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 11 01:10:30 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  9. internal/lsync/lrwmutex.go

    func (lm *LRWMutex) RUnlock() {
    	isWriteLock := false
    	success := lm.unlock(isWriteLock)
    	if !success {
    		panic("Trying to RUnlock() while no RLock() is active")
    	}
    }
    
    func (lm *LRWMutex) unlock(isWriteLock bool) (unlocked bool) {
    	lm.mu.Lock()
    	defer lm.mu.Unlock()
    
    	// Try to release lock.
    	if isWriteLock {
    		if lm.isWriteLock && lm.ref == 1 {
    			lm.ref = 0
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  10. internal/bucket/bandwidth/monitor.go

    	m.tlock.Unlock()
    	m.mlock.Lock()
    	delete(m.bucketsMeasurement, BucketOptions{Name: bucket, ReplicationARN: arn})
    	m.mlock.Unlock()
    }
    
    // throttle returns currently configured throttle for this bucket
    func (m *Monitor) throttle(opts BucketOptions) *bucketThrottle {
    	m.tlock.RLock()
    	defer m.tlock.RUnlock()
    	return m.bucketsThrottle[opts]
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Feb 19 22:54:46 GMT 2024
    - 6K bytes
    - Viewed (0)
Back to top