Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for testRacyRead (0.2 sec)

  1. src/vendor/golang.org/x/net/nettest/conntest.go

    	// Start off the chain reaction.
    	if _, err := c1.Write(make([]byte, 8)); err != nil {
    		t.Errorf("unexpected c1.Write error: %v", err)
    	}
    }
    
    // testRacyRead tests that it is safe to mutate the input Read buffer
    // immediately after cancelation has occurred.
    func testRacyRead(t *testing.T, c1, c2 net.Conn) {
    	go chunkedCopy(c2, rand.New(rand.NewSource(0)))
    
    	var wg sync.WaitGroup
    	defer wg.Wait()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. src/os/timeout_test.go

    				t.Error("Write returned non-timeout error", err)
    			}
    		}
    	}()
    	wg.Wait() // wait for tester goroutine to stop
    }
    
    // TestRacyRead tests that it is safe to mutate the input Read buffer
    // immediately after cancellation has occurred.
    func TestRacyRead(t *testing.T) {
    	t.Parallel()
    
    	r, w, err := os.Pipe()
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer r.Close()
    	defer w.Close()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 17.1K bytes
    - Viewed (0)
Back to top