Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for TestPreemption (0.17 sec)

  1. src/runtime/proc_test.go

    // Declaring a var avoids inlining at the call site.
    var preempt = func() int {
    	var a [128]int
    	sum := 0
    	for _, v := range a {
    		sum += v
    	}
    	return sum
    }
    
    func TestPreemption(t *testing.T) {
    	if runtime.GOARCH == "wasm" {
    		t.Skip("no preemption on wasm yet")
    	}
    
    	// Test that goroutines are preempted at function calls.
    	N := 5
    	if testing.Short() {
    		N = 2
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 25.8K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testcarchive/carchive_test.go

    			cmd.Process.Kill()
    		},
    	)
    	defer timer.Stop()
    
    	err = cmd.Wait()
    	t.Logf("%v\n%s", cmd.Args, sb)
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    // Issue 49288.
    func TestPreemption(t *testing.T) {
    	if runtime.Compiler == "gccgo" {
    		t.Skip("skipping asynchronous preemption test with gccgo")
    	}
    	globalSkip(t)
    	testenv.MustHaveGoBuild(t)
    	testenv.MustHaveCGO(t)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:43:51 UTC 2023
    - 34.8K bytes
    - Viewed (0)
Back to top