Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. src/cmd/go/internal/vcweb/vcweb.go

    func (s *Server) HandleScript(scriptRelPath string, logger *log.Logger, f func(http.Handler)) error {
    	ri, ok := s.scriptCache.Load(scriptRelPath)
    	if !ok {
    		ri, _ = s.scriptCache.LoadOrStore(scriptRelPath, new(scriptResult))
    	}
    	r := ri.(*scriptResult)
    
    	relDir := strings.TrimSuffix(scriptRelPath, filepath.Ext(scriptRelPath))
    	workDir := filepath.Join(s.workDir, relDir)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 12.1K bytes
    - Viewed (0)
  3. 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)
  4. src/net/rpc/server.go

    		} else {
    			str = "rpc.Register: type " + sname + " has no exported methods of suitable type"
    		}
    		log.Print(str)
    		return errors.New(str)
    	}
    
    	if _, dup := server.serviceMap.LoadOrStore(sname, s); dup {
    		return errors.New("rpc: service already defined: " + sname)
    	}
    	return nil
    }
    
    // suitableMethods returns suitable Rpc methods of typ. It will log
    // errors if logErr is true.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 21.6K bytes
    - Viewed (0)
  5. src/cmd/go/internal/modload/modfile.go

    		}
    		if f.Module != nil {
    			summary.module = f.Module.Mod
    			summary.deprecated = f.Module.Deprecated
    		}
    		if f.Go != nil {
    			rawGoVersion.LoadOrStore(m, f.Go.Version)
    			summary.goVersion = f.Go.Version
    			summary.pruning = pruningForGoVersion(f.Go.Version)
    		} else {
    			summary.pruning = unpruned
    		}
    		if f.Toolchain != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 26 17:53:40 UTC 2023
    - 26.7K bytes
    - Viewed (0)
  6. 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)
  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