Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 938 for rwmutex (0.37 sec)

  1. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/dropped_requests_tracker.go

    }
    
    // unixStat keeps a statistic how many requests were dropped within
    // a single second.
    type unixStat struct {
    	unixTime int64
    	requests int64
    }
    
    type droppedRequestsStats struct {
    	lock sync.RWMutex
    
    	// history stores the history of dropped requests.
    	history []unixStat
    
    	// To reduce lock-contention, we store the information about
    	// the current second here, which we can then access under
    	// reader lock.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 26 13:50:25 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  2. cmd/bucket-targets.go

    }
    
    // BucketTargetSys represents bucket targets subsystem
    type BucketTargetSys struct {
    	sync.RWMutex
    	arnRemotesMap map[string]arnTarget
    	targetsMap    map[string][]madmin.BucketTarget
    	hMutex        sync.RWMutex
    	hc            map[string]epHealth
    	hcClient      *madmin.AnonymousClient
    	aMutex        sync.RWMutex
    	arnErrsMap    map[string]arnErrs // map of ARN to error count of failures to get target
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 01:09:56 UTC 2024
    - 20.9K bytes
    - Viewed (0)
  3. internal/config/callhome/callhome.go

    type Config struct {
    	// Flag indicating whether callhome is enabled.
    	Enable bool `json:"enable"`
    
    	// The interval between callhome cycles
    	Frequency time.Duration `json:"frequency"`
    }
    
    var configLock sync.RWMutex
    
    // Enabled - indicates if callhome is enabled or not
    func (c *Config) Enabled() bool {
    	configLock.RLock()
    	defer configLock.RUnlock()
    
    	return c.Enable
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/runtime/mapper.go

    	r.mutex.RLock()
    	defer r.mutex.RUnlock()
    	return r.resources[r.keys[resource.GroupResource()]][subresource]
    }
    func (r *equivalentResourceRegistry) KindFor(resource schema.GroupVersionResource, subresource string) schema.GroupVersionKind {
    	r.mutex.RLock()
    	defer r.mutex.RUnlock()
    	return r.kinds[resource][subresource]
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 18:26:06 UTC 2019
    - 3.6K bytes
    - Viewed (0)
  5. src/crypto/x509/root.go

    //   - github.com/breml/rootcerts
    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname systemRoots
    var (
    	once           sync.Once
    	systemRootsMu  sync.RWMutex
    	systemRoots    *CertPool
    	systemRootsErr error
    	fallbacksSet   bool
    )
    
    func systemRootsPool() *CertPool {
    	once.Do(initSystemRoots)
    	systemRootsMu.RLock()
    	defer systemRootsMu.RUnlock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  6. pkg/kubelet/config/sources.go

    		sourcesReadyFn: sourcesReadyFn,
    	}
    }
    
    // sourcesImpl implements SourcesReady.  It is thread-safe.
    type sourcesImpl struct {
    	// lock protects access to sources seen.
    	lock sync.RWMutex
    	// set of sources seen.
    	sourcesSeen sets.Set[string]
    	// sourcesReady is a function that evaluates if the sources are ready.
    	sourcesReadyFn SourcesReadyFn
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/quota/v1/generic/registry.go

    */
    
    package generic
    
    import (
    	"sync"
    
    	"k8s.io/apimachinery/pkg/runtime/schema"
    	quota "k8s.io/apiserver/pkg/quota/v1"
    )
    
    // implements a basic registry
    type simpleRegistry struct {
    	lock sync.RWMutex
    	// evaluators tracked by the registry
    	evaluators map[schema.GroupResource]quota.Evaluator
    }
    
    // NewRegistry creates a simple registry with initial list of evaluators
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 04 12:53:52 UTC 2020
    - 2.2K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher_test.go

    )
    
    // verifies the cacheWatcher.process goroutine is properly cleaned up even if
    // the writes to cacheWatcher.result channel is blocked.
    func TestCacheWatcherCleanupNotBlockedByResult(t *testing.T) {
    	var lock sync.RWMutex
    	var w *cacheWatcher
    	count := 0
    	filter := func(string, labels.Set, fields.Set) bool { return true }
    	forget := func(drainWatcher bool) {
    		lock.Lock()
    		defer lock.Unlock()
    		count++
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 09:20:10 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  9. pilot/pkg/model/addressmap.go

    	// for race conditions.
    	Addresses map[cluster.ID][]string
    
    	// NOTE: The copystructure library is not able to copy unexported fields, so the mutex will not be copied.
    	mutex sync.RWMutex
    }
    
    func (m *AddressMap) Len() int {
    	if m == nil {
    		return 0
    	}
    	m.mutex.RLock()
    	defer m.mutex.RUnlock()
    
    	return len(m.Addresses)
    }
    
    func (m *AddressMap) DeepCopy() *AddressMap {
    	if m == nil {
    		return nil
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 06 14:34:57 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  10. pkg/kubelet/pod/testing/fake_mirror_client.go

    	v1 "k8s.io/api/core/v1"
    	"k8s.io/apimachinery/pkg/types"
    	"k8s.io/apimachinery/pkg/util/sets"
    	kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
    )
    
    type FakeMirrorClient struct {
    	mirrorPodLock sync.RWMutex
    	// Note that a real mirror manager does not store the mirror pods in
    	// itself. This fake manager does this to track calls.
    	mirrorPods   sets.Set[string]
    	createCounts map[string]int
    	deleteCounts map[string]int
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 2.4K bytes
    - Viewed (0)
Back to top