Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 17 of 17 for LoadOrStore (0.17 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. internal/grid/connection.go

    			client.cancelFn(context.DeadlineExceeded)
    			return nil, context.DeadlineExceeded
    		}
    	}
    	for {
    		// Handle the extremely unlikely scenario that we wrapped.
    		if _, loaded := c.outgoing.LoadOrStore(client.MuxID, client); client.MuxID != 0 && !loaded {
    			if debugReqs {
    				_, found := c.outgoing.Load(client.MuxID)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 44.8K bytes
    - Viewed (0)
  6. src/cmd/go/internal/modload/buildlist.go

    		})
    	}
    
    	var enqueue func(m module.Version, pruning modPruning)
    	enqueue = func(m module.Version, pruning modPruning) {
    		if m.Version == "none" {
    			return
    		}
    
    		if _, dup := loading.LoadOrStore(dedupKey{m, pruning}, nil); dup {
    			// m has already been enqueued for loading. Since unpruned loading may
    			// follow cycles in the requirement graph, we need to return early
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 16:04:44 UTC 2024
    - 53.8K bytes
    - Viewed (0)
  7. 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)
Back to top