Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestPipe3 (0.14 sec)

  1. src/io/pipe_test.go

    	err error
    }
    
    // Test a large write that requires multiple reads to satisfy.
    func writer(w WriteCloser, buf []byte, c chan pipeReturn) {
    	n, err := w.Write(buf)
    	w.Close()
    	c <- pipeReturn{n, err}
    }
    
    func TestPipe3(t *testing.T) {
    	c := make(chan pipeReturn)
    	r, w := Pipe()
    	var wdat = make([]byte, 128)
    	for i := 0; i < len(wdat); i++ {
    		wdat[i] = byte(i)
    	}
    	go writer(w, wdat, c)
    	var rdat = make([]byte, 1024)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9K bytes
    - Viewed (0)
Back to top