Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestMultiConsumer (0.2 sec)

  1. src/runtime/chan_test.go

    			n0 += (i + 1) % 2
    			n1 += i
    		}
    		if n0 <= n/10 || n1 <= n/10 {
    			t.Errorf("Want pseudorandom, got %d zeros and %d ones (chan cap %d)", n0, n1, chanCap)
    		}
    	}
    }
    
    func TestMultiConsumer(t *testing.T) {
    	const nwork = 23
    	const niter = 271828
    
    	pn := []int{2, 3, 7, 11, 13, 17, 19, 23, 27, 31}
    
    	q := make(chan int, nwork*3)
    	r := make(chan int, nwork*3)
    
    	// workers
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:47:35 UTC 2023
    - 23.4K bytes
    - Viewed (0)
Back to top