- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestDeferPtrsGoexit (0.12 sec)
-
src/runtime/stack_test.go
// stack growth does not invalidate a later attempt. func TestDeferPtrsGoexit(t *testing.T) { for i := 0; i < 100; i++ { c := make(chan int, 1) go testDeferPtrsGoexit(c, i) if n := <-c; n != 42 { t.Fatalf("defer's stack references were not adjusted appropriately (i=%d n=%d)", i, n) } } } func testDeferPtrsGoexit(c chan int, i int) { var y int defer func() { c <- y }()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 23.1K bytes - Viewed (0)