Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestIssue5745 (0.22 sec)

  1. src/time/sleep_test.go

    	case <-After(1 * Second):
    		t.Fatalf("negative timeout didn't fire")
    	}
    }
    
    // Test that a panic while deleting a timer does not leave
    // the timers mutex held, deadlocking a ticker.Stop in a defer.
    func TestIssue5745(t *testing.T) {
    	ticker := NewTicker(Hour)
    	defer func() {
    		// would deadlock here before the fix due to
    		// lock taken before the segfault.
    		ticker.Stop()
    
    		if r := recover(); r == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:33:57 UTC 2024
    - 22.5K bytes
    - Viewed (0)
Back to top