- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 483 for rwmutex (0.19 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/sync/rwmutex_test.go
<-cdone } } func TestRWMutex(t *testing.T) { var m RWMutex m.Lock() if m.TryLock() { t.Fatalf("TryLock succeeded with mutex locked") } if m.TryRLock() { t.Fatalf("TryRLock succeeded with mutex locked") } m.Unlock() if !m.TryLock() { t.Fatalf("TryLock failed with mutex unlocked") } m.Unlock() if !m.TryRLock() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 29 17:13:13 UTC 2021 - 4.9K bytes - Viewed (0) -
src/sync/mutex_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 16 21:25:35 UTC 2022 - 5.9K bytes - Viewed (0) -
src/runtime/race/testdata/rwmutex_test.go
func TestRaceMutexRWMutex(t *testing.T) { var mu1 sync.Mutex var mu2 sync.RWMutex var x int16 = 0 _ = x ch := make(chan bool, 2) go func() { mu1.Lock() defer mu1.Unlock() x = 1 ch <- true }() go func() { mu2.Lock() x = 2 mu2.Unlock() ch <- true }() <-ch <-ch } func TestNoRaceRWMutex(t *testing.T) { var mu sync.RWMutex var x, y int64 = 0, 1 _ = y
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 03 22:09:38 UTC 2017 - 2.1K 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_test.go
}, nil, nil), }, Mu: &sync.RWMutex{}, }, }, objCacheRemovalKey: "cache-foo-key", removalKey: "obj-foo-key", expectedCache: ObjectCache{ Cache: map[string]*object.K8sObject{ "dont-touch-me-key": object.NewK8sObject(&unstructured.Unstructured{ Object: make(map[string]any), }, nil, nil), }, Mu: &sync.RWMutex{}, }, }, }
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Jan 20 18:46:12 UTC 2023 - 5.3K bytes - Viewed (0) -
cmd/namespace-lock.go
func newNSLock(isDistErasure bool) *nsLockMap { nsMutex := nsLockMap{ isDistErasure: isDistErasure, } if isDistErasure { return &nsMutex } nsMutex.lockMap = make(map[string]*nsLock) return &nsMutex } // nsLock - provides primitives for locking critical namespace regions. type nsLock struct { ref int32 *lsync.LRWMutex } // nsLockMap - namespace lock map, provides primitives to Lock,
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 05 23:56:35 UTC 2023 - 9.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)