Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 155 for rwmutex (0.42 sec)

  1. src/sync/rwmutex.go

    // not locked for writing on entry to Unlock.
    //
    // As with Mutexes, a locked [RWMutex] is not associated with a particular
    // goroutine. One goroutine may [RWMutex.RLock] ([RWMutex.Lock]) a RWMutex and then
    // arrange for another goroutine to [RWMutex.RUnlock] ([RWMutex.Unlock]) it.
    func (rw *RWMutex) Unlock() {
    	if race.Enabled {
    		_ = rw.w.state
    		race.Release(unsafe.Pointer(&rw.readerSem))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 21:14:51 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. src/runtime/rwmutex.go

    )
    
    // This is a copy of sync/rwmutex.go rewritten to work in the runtime.
    
    // A rwmutex is a reader/writer mutual exclusion lock.
    // The lock can be held by an arbitrary number of readers or a single writer.
    // This is a variant of sync.RWMutex, for the runtime package.
    // Like mutex, rwmutex blocks the calling M.
    // It does not interact with the goroutine scheduler.
    type rwmutex struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 14:29:04 UTC 2024
    - 5K bytes
    - Viewed (0)
  3. internal/config/identity/openid/jwt_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	fmt.Println(token)
    
    	u1, err := xnet.ParseHTTPURL(server.URL)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	pubKeys := publicKeys{
    		RWMutex: &sync.RWMutex{},
    		pkMap:   map[string]interface{}{},
    	}
    	pubKeys.add("76b95ae5-33ef-4283-97b7-d2a85dc2d8f4", []byte("WNGvKVyyNmXq0TraSvjaDN9CtpFgx35IXtGEffMCPR0"))
    
    	if len(pubKeys.pkMap) != 1 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  4. pkg/kube/krt/index.go

    package krt
    
    import (
    	"sync"
    
    	"istio.io/istio/pkg/ptr"
    	"istio.io/istio/pkg/util/sets"
    )
    
    // Index maintains a simple index over an informer
    type Index[I any, K comparable] struct {
    	mu      sync.RWMutex
    	objects map[K]sets.Set[Key[I]]
    	c       Collection[I]
    	extract func(o I) []K
    }
    
    // Lookup finds all objects matching a given key
    func (i *Index[I, K]) Lookup(k K) []I {
    	i.mu.RLock()
    	defer i.mu.RUnlock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 14 04:53:45 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  5. internal/bucket/bandwidth/monitor.go

    type bucketThrottle struct {
    	*rate.Limiter
    	NodeBandwidthPerSec int64
    }
    
    // Monitor holds the state of the global bucket monitor
    type Monitor struct {
    	tlock sync.RWMutex // mutex for bucket throttling
    	mlock sync.RWMutex // mutex for bucket measurement
    
    	bucketsThrottle    map[BucketOptions]*bucketThrottle
    	bucketsMeasurement map[BucketOptions]*bucketMeasurement // Buckets with objects in flight
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Feb 19 22:54:46 UTC 2024
    - 6K bytes
    - Viewed (0)
  6. pkg/scheduler/framework/runtime/waiting_pods_map.go

    	"k8s.io/kubernetes/pkg/scheduler/framework"
    )
    
    // waitingPodsMap a thread-safe map used to maintain pods waiting in the permit phase.
    type waitingPodsMap struct {
    	pods map[types.UID]*waitingPod
    	mu   sync.RWMutex
    }
    
    // NewWaitingPodsMap returns a new waitingPodsMap.
    func NewWaitingPodsMap() *waitingPodsMap {
    	return &waitingPodsMap{
    		pods: make(map[types.UID]*waitingPod),
    	}
    }
    
    // add a new WaitingPod to the map.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  7. pilot/pkg/trustbundle/trustbundle.go

    }
    
    type TrustAnchorUpdate struct {
    	TrustAnchorConfig
    	Source Source
    }
    
    type TrustBundle struct {
    	sourceConfig       map[Source]TrustAnchorConfig
    	mutex              sync.RWMutex
    	mergedCerts        []string
    	updatecb           func()
    	endpointMutex      sync.RWMutex
    	endpoints          []string
    	endpointUpdateChan chan struct{}
    	remoteCaCertPool   *x509.CertPool
    	meshConfig         mesh.Watcher
    }
    
    var (
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  8. cmd/kubeadm/app/apis/kubeadm/timeoututils.go

    		UpgradeManifests:                 &metav1.Duration{Duration: constants.UpgradeManifestsTimeout},
    	}
    }
    
    var (
    	activeTimeouts *Timeouts = nil
    	timeoutMutex             = &sync.RWMutex{}
    )
    
    func init() {
    	SetDefaultTimeouts(&activeTimeouts)
    }
    
    // GetActiveTimeouts gets the active timeouts structure.
    func GetActiveTimeouts() *Timeouts {
    	timeoutMutex.RLock()
    	defer timeoutMutex.RUnlock()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 01 11:04:08 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. cmd/ilm-config.go

    	"github.com/minio/minio/internal/config/ilm"
    )
    
    var globalILMConfig = ilmConfig{
    	cfg: ilm.Config{
    		ExpirationWorkers: 100,
    		TransitionWorkers: 100,
    	},
    }
    
    type ilmConfig struct {
    	mu  sync.RWMutex
    	cfg ilm.Config
    }
    
    func (c *ilmConfig) getExpirationWorkers() int {
    	c.mu.RLock()
    	defer c.mu.RUnlock()
    
    	return c.cfg.ExpirationWorkers
    }
    
    func (c *ilmConfig) getTransitionWorkers() int {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Mar 05 02:50:24 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  10. pilot/pkg/networking/core/envoyfilter/monitoring.go

    			return features.EnableEnvoyFilterMetrics
    		}),
    	)
    )
    
    var (
    	envoyFilterStatusMap = map[string]map[string]bool{} // Map of Envoy filter name, patch and status.
    	envoyFilterMutex     sync.RWMutex
    )
    
    // IncrementEnvoyFilterMetric increments filter metric.
    func IncrementEnvoyFilterMetric(name string, pt PatchType, applied bool) {
    	if !features.EnableEnvoyFilterMetrics {
    		return
    	}
    	envoyFilterMutex.Lock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Mar 28 17:09:02 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top