Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testSemaHandoff (0.1 sec)

  1. src/runtime/sema_test.go

    	. "runtime"
    	"sync"
    	"sync/atomic"
    	"testing"
    )
    
    // TestSemaHandoff checks that when semrelease+handoff is
    // requested, the G that releases the semaphore yields its
    // P directly to the first waiter in line.
    // See issue 33747 for discussion.
    func TestSemaHandoff(t *testing.T) {
    	const iter = 10000
    	ok := 0
    	for i := 0; i < iter; i++ {
    		if testSemaHandoff() {
    			ok++
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 21 19:37:22 UTC 2022
    - 4.2K bytes
    - Viewed (0)
Back to top