Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for mustBlock (0.51 sec)

  1. src/cmd/go/internal/lockedfile/lockedfile_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	return dir, func() { os.RemoveAll(dir) }
    }
    
    const (
    	quiescent            = 10 * time.Millisecond
    	probablyStillBlocked = 10 * time.Second
    )
    
    func mustBlock(t *testing.T, desc string, f func()) (wait func(*testing.T)) {
    	t.Helper()
    
    	done := make(chan struct{})
    	go func() {
    		f()
    		close(done)
    	}()
    
    	timer := time.NewTimer(quiescent)
    	defer timer.Stop()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 5.7K bytes
    - Viewed (0)
Back to top