Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for exercise (0.35 sec)

  1. src/net/http/transport_test.go

    				}, nil
    			}
    		},
    	).ts
    	// Set a short delay in RoundTrip to give the persistConn time to notice
    	// the connection is broken. We want to exercise the path where writeLoop exits
    	// before it reads the request to send. If this delay is too short, we may instead
    	// exercise the path where writeLoop accepts the request and then fails to write it.
    	// That's fine, so long as we get the desired path often enough.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  2. src/cmd/go/internal/work/exec.go

    	default:
    		return false
    	}
    
    	if argLen > sys.ExecArgLengthLimit {
    		return true
    	}
    
    	// On the Go build system, use response files about 10% of the
    	// time, just to exercise this codepath.
    	isBuilder := os.Getenv("GO_BUILDER_NAME") != ""
    	if isBuilder && rand.Intn(10) == 0 {
    		return true
    	}
    
    	return false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 14:46:37 UTC 2024
    - 105.6K bytes
    - Viewed (0)
  3. src/net/http/server.go

    // Ideally we could find a solution that doesn't involve polling,
    // but which also doesn't have a high runtime cost (and doesn't
    // involve any contentious mutexes), but that is left as an
    // exercise for the reader.
    const shutdownPollIntervalMax = 500 * time.Millisecond
    
    // Shutdown gracefully shuts down the server without interrupting any
    // active connections. Shutdown works by first closing all open
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 123.4K bytes
    - Viewed (0)
  4. src/net/http/serve_test.go

    	cst := newClientServerTest(t, mode, HandlerFunc(func(w ResponseWriter, r *Request) {
    		_, err := w.Write([]byte("<html>"))
    		if err != nil {
    			t.Errorf("ResponseWriter.Write: %v", err)
    		}
    
    		// Also exercise the ReaderFrom path
    		_, err = io.Copy(w, strings.NewReader("789a"))
    		if err != nil {
    			t.Errorf("Copy(ResponseWriter, ...): %v", err)
    		}
    	}))
    	res, err := cst.c.Head(cst.ts.URL)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 17:57:01 UTC 2024
    - 202K bytes
    - Viewed (0)
  5. src/reflect/all_test.go

    }
    
    // This will be index 2.
    func (p Point) GCMethod(k int) int {
    	runtime.GC()
    	return k + p.x
    }
    
    // This will be index 3.
    func (p Point) NoArgs() {
    	// Exercise no-argument/no-result paths.
    }
    
    // This will be index 4.
    func (p Point) TotalDist(points ...Point) int {
    	tot := 0
    	for _, q := range points {
    		dx := q.x - p.x
    		dy := q.y - p.y
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
  6. src/database/sql/sql_test.go

    			// Busy usedConns.
    			testUseConns(t, usedConns, baseTime, db)
    
    			tm := baseTime.Add(item.timeOffset)
    
    			// Reuse connections which should never be considered idle
    			// and exercises the sorting for issue 39471.
    			tm = testUseConns(t, reusedConns, tm, db)
    
    			tm = tm.Add(item.secondTimeOffset)
    			nowFunc = func() time.Time {
    				return tm
    			}
    
    			db.mu.Lock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 111.6K bytes
    - Viewed (0)
Back to top