- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 247 for rwmutex (0.46 sec)
-
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) -
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) -
test/inline_sync.go
} var rwmutex *sync.RWMutex func small8() { // ERROR "can inline small8" // the RUnlock fast path should be inlined rwmutex.RUnlock() // ERROR "inlining call to sync\.\(\*RWMutex\)\.RUnlock" "inlining call to atomic\.\(\*Int32\)\.Add" } func small9() { // ERROR "can inline small9" // the RLock fast path should be inlined
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 06 21:01:50 UTC 2023 - 1.6K bytes - Viewed (0) -
src/runtime/rwmutex_test.go
// GOMAXPROCS=10 go test // This is a copy of sync/rwmutex_test.go rewritten to test the // runtime rwmutex. package runtime_test import ( "fmt" . "runtime" "runtime/debug" "sync/atomic" "testing" ) func parallelReader(m *RWMutex, clocked chan bool, cunlock *atomic.Bool, cdone chan bool) { m.RLock() clocked <- true for !cunlock.Load() { } m.RUnlock()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 15 22:00:45 UTC 2023 - 4.2K bytes - Viewed (0) -
operator/pkg/cache/cache.go
// Cache is a cache keyed by object Hash() function. Cache map[string]*object.K8sObject Mu *sync.RWMutex } var ( // objectCaches holds the latest copy of each object applied by the controller. The caches are divided by component // name. objectCaches = make(map[string]*ObjectCache) objectCachesMu sync.RWMutex ) // FlushObjectCaches flushes all object caches. func FlushObjectCaches() { objectCachesMu.Lock()
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Dec 06 13:12:49 UTC 2023 - 2.4K bytes - Viewed (0) -
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) -
pkg/monitoring/gauge.go
// attributeSets stores a map of attributes -> values, for gauges. attributeSetsMutex *sync.RWMutex attributeSets map[attribute.Set]*gaugeValues currentGaugeSet *gaugeValues } var _ Metric = &gauge{} func newGauge(o options) *gauge { r := &gauge{ attributeSetsMutex: &sync.RWMutex{}, } r.attributeSets = map[attribute.Set]*gaugeValues{} g, err := meter().Float64ObservableGauge(o.name,
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Sep 13 16:04:48 UTC 2023 - 2.9K bytes - Viewed (0) -
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) -
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) -
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)