Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 167 for Unlock (0.26 sec)

  1. cni/pkg/nodeagent/pod_cache.go

    func (p *podNetnsCache) Get(uid string) Netns {
    	// lock current snapshot pod map
    	p.mu.RLock()
    	defer p.mu.RUnlock()
    	if info, f := p.currentPodCache[uid]; f {
    		return info.Netns
    	}
    	return nil
    }
    
    // make sure uid is in the cache, even if we don't have a netns
    func (p *podNetnsCache) Ensure(uid string) {
    	p.mu.Lock()
    	defer p.mu.Unlock()
    	if _, ok := p.currentPodCache[uid]; !ok {
    Go
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 4.5K bytes
    - Viewed (0)
  2. internal/once/init.go

    // if it is not successful yet.
    func (l *Init) Do(f func() error) error {
    	if atomic.LoadUint32(&l.done) == 0 {
    		return l.do(f)
    	}
    	return nil
    }
    
    func (l *Init) do(f func() error) error {
    	l.m.Lock()
    	defer l.m.Unlock()
    	if atomic.LoadUint32(&l.done) == 0 {
    		if err := f(); err != nil {
    			return err
    		}
    		// Mark as done only when f() is successful
    		atomic.StoreUint32(&l.done, 1)
    	}
    	return nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue May 09 04:20:31 GMT 2023
    - 2.1K 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 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Mar 07 16:12:41 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  4. 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 21 19:28:08 GMT 2024
    - Last Modified: Fri Mar 01 16:00:42 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. internal/bucket/bandwidth/measurement.go

    func (m *bucketMeasurement) updateExponentialMovingAverage(endTime time.Time) {
    	// Calculate aggregate avg bandwidth and exp window avg
    	m.lock.Lock()
    	defer func() {
    		m.startTime = endTime
    		m.lock.Unlock()
    	}()
    
    	if m.startTime.IsZero() {
    		return
    	}
    
    	if endTime.Before(m.startTime) {
    		return
    	}
    
    	duration := endTime.Sub(m.startTime)
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Jun 03 20:41:51 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  6. 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 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.9K bytes
    - Viewed (1)
  7. 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
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Apr 08 09:22:27 GMT 2024
    - 10K bytes
    - Viewed (0)
  8. cmd/erasure-object_test.go

    		t.Fatal(err)
    	}
    
    	erasureDisks := xl.getDisks()
    	z.serverPools[0].erasureDisksMu.Lock()
    	xl.getDisks = func() []StorageAPI {
    		for i := range erasureDisks[:6] {
    			erasureDisks[i] = newNaughtyDisk(erasureDisks[i], nil, errFaultyDisk)
    		}
    		return erasureDisks
    	}
    
    	z.serverPools[0].erasureDisksMu.Unlock()
    	_, err = obj.DeleteObject(ctx, bucket, object, ObjectOptions{})
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 36.8K bytes
    - Viewed (0)
  9. 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)
  10. cmd/erasure-server-pool.go

    	defer func() {
    		if unlockOnDefer {
    			nsUnlocker()
    		}
    	}()
    
    	// Acquire lock
    	if !opts.NoLock {
    		lock := z.NewNSLock(bucket, object)
    		lkctx, err := lock.GetRLock(ctx, globalOperationTimeout)
    		if err != nil {
    			return nil, err
    		}
    		ctx = lkctx.Context()
    		nsUnlocker = func() { lock.RUnlock(lkctx) }
    		unlockOnDefer = true
    	}
    
    	checkPrecondFn := opts.CheckPrecondFn
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 77.8K bytes
    - Viewed (0)
Back to top