- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for LoadOrStore (0.2 sec)
-
src/sync/map.go
// read and write operations are defined as follows. // [Map.Load], [Map.LoadAndDelete], [Map.LoadOrStore], [Map.Swap], [Map.CompareAndSwap], // and [Map.CompareAndDelete] are read operations; // [Map.Delete], [Map.LoadAndDelete], [Map.Store], and [Map.Swap] are write operations; // [Map.LoadOrStore] is a write operation when it returns loaded set to false;
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 21:14:51 UTC 2024 - 15.6K bytes - Viewed (0) -
src/internal/concurrent/hashtriemap.go
i = n.indirect() } panic("internal/concurrent.HashMapTrie: ran out of hash bits while iterating") } // LoadOrStore returns the existing value for the key if present. // Otherwise, it stores and returns the given value. // The loaded result is true if the value was loaded, false if stored. func (ht *HashTrieMap[K, V]) LoadOrStore(key K, value V) (result V, loaded bool) { hash := ht.keyHash(abi.NoEscape(unsafe.Pointer(&key)), ht.seed)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 16:01:55 UTC 2024 - 11.8K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/util/peerproxy/peerproxy_handler_test.go
ppI.addToStorageVersionMap(svdata.gvr, svdata.serverId) } return ppI, nil } func (h *peerProxyHandler) addToStorageVersionMap(gvr schema.GroupVersionResource, serverId string) { apiserversi, _ := h.svMap.LoadOrStore(gvr, &sync.Map{}) apiservers := apiserversi.(*sync.Map) if serverId != "" { apiservers.Store(serverId, true) } } func testDataExists(gvr schema.GroupVersionResource) bool {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Apr 24 18:25:29 UTC 2024 - 10.8K bytes - Viewed (0) -
src/encoding/gob/type.go
// Store the name and type provided by the user.... if t, dup := nameToConcreteType.LoadOrStore(name, reflect.TypeOf(value)); dup && t != ut.user { panic(fmt.Sprintf("gob: registering duplicate types for %q: %s != %s", name, t, ut.user)) } // but the flattened type in the type table, since that's what decode needs. if n, dup := concreteTypeToName.LoadOrStore(ut.base, name); dup && n != name { nameToConcreteType.Delete(name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 02:00:26 UTC 2024 - 27.2K bytes - Viewed (0) -
schema/schema.go
} } } // Cache the schema if v, loaded := cacheStore.LoadOrStore(schemaCacheKey, schema); loaded { s := v.(*Schema) // Wait for the initialization of other goroutines to complete <-s.initialized return s, s.err } defer func() { if schema.err != nil {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Wed Jun 12 10:52:33 UTC 2024 - 13.7K bytes - Viewed (0) -
src/cmd/go/internal/modfetch/codehost/codehost.go
func RunWithStdin(ctx context.Context, dir string, stdin io.Reader, cmdline ...any) ([]byte, error) { if dir != "" { muIface, ok := dirLock.Load(dir) if !ok { muIface, _ = dirLock.LoadOrStore(dir, new(sync.Mutex)) } mu := muIface.(*sync.Mutex) mu.Lock() defer mu.Unlock() } cmd := str.StringList(cmdline...) if os.Getenv("TESTGOVCS") == "panic" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Apr 14 18:50:24 UTC 2024 - 12.8K bytes - Viewed (0) -
src/encoding/json/encode.go
// real func (f) to be ready and then calls it. This indirect // func is only used for recursive types. var ( wg sync.WaitGroup f encoderFunc ) wg.Add(1) fi, loaded := encoderCache.LoadOrStore(t, encoderFunc(func(e *encodeState, v reflect.Value, opts encOpts) { wg.Wait() f(e, v, opts) })) if loaded { return fi.(encoderFunc) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 36.2K bytes - Viewed (0) -
internal/grid/connection.go
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 44.8K bytes - Viewed (0) -
src/os/exec/exec_test.go
// which to run the command. func helperCommandContext(t *testing.T, ctx context.Context, name string, args ...string) (cmd *exec.Cmd) { helperCommandUsed.LoadOrStore(name, true) t.Helper() testenv.MustHaveExec(t) cs := append([]string{name}, args...) if ctx != nil { cmd = exec.CommandContext(ctx, exePath(t), cs...) } else {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 20:13:53 UTC 2024 - 48.4K bytes - Viewed (0)