Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,285 for Goexit (0.12 sec)

  1. src/iter/iter.go

    			// Propagate panics and goexits from seq.
    			if panicValue != nil {
    				if panicValue == goexitPanicValue {
    					// Propagate runtime.Goexit from seq.
    					runtime.Goexit()
    				} else {
    					panic(panicValue)
    				}
    			}
    		}
    	}
    	return next, stop
    }
    
    // goexitPanicValue is a sentinel value indicating that an iterator
    // exited via runtime.Goexit.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  2. src/runtime/testdata/testprog/deadlock.go

    	// 3. call goexit
    	// Goexit runs the #2 defer. Its panic
    	// is caught by the #1 defer.  For Goexit, we explicitly
    	// resume execution in the Goexit loop, instead of resuming
    	// execution in the caller (which would make the Goexit disappear!)
    	defer func() {
    		r := recover()
    		if r == nil {
    			panic("bad recover")
    		}
    	}()
    	defer func() {
    		panic("hello")
    	}()
    	runtime.Goexit()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 27 20:44:24 UTC 2021
    - 6.5K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/test_example_goexit.txt

    stdout '(?s)--- PASS.*--- FAIL.*'
    stdout 'panic: test executed panic\(nil\) or runtime\.Goexit'
    
    -- go.mod --
    module examplegoexit
    
    go 1.16
    -- example_test.go --
    package main
    
    import (
    	"fmt"
    	"runtime"
    )
    
    func ExamplePass() {
    	fmt.Println("pass")
    	// Output:
    	// pass
    }
    
    func ExampleGoexit() {
    	runtime.Goexit()
    	// Output:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 17 13:25:29 UTC 2020
    - 403 bytes
    - Viewed (0)
  4. src/iter/pull_test.go

    		for {
    			if !yield(55, 100) {
    				runtime.Goexit()
    			}
    		}
    	}
    }
    
    func goexits(t *testing.T, f func()) bool {
    	t.Helper()
    
    	exit := make(chan bool)
    	go func() {
    		cleanExit := false
    		defer func() {
    			exit <- recover() == nil && !cleanExit
    		}()
    		f()
    		cleanExit = true
    	}()
    	return <-exit
    }
    
    func TestPullImmediateStop(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  5. test/fixedbugs/issue8158.go

    	go f2(c)
    	<-c
    }
    
    func f1(done chan bool) {
    	defer func() {
    		recover()
    		done <- true
    		runtime.Goexit() // left stack-allocated Panic struct on gp->panic stack
    	}()
    	panic("p")
    }
    
    func f2(done chan bool) {
    	defer func() {
    		recover()
    		done <- true
    		runtime.Goexit()
    	}()
    	time.Sleep(10 * time.Millisecond) // overwrote Panic struct with Timer struct
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 767 bytes
    - Viewed (0)
  6. test/fixedbugs/issue5963.go

    	c := make(chan int, 1)
    	defer func() {
    		c <- 0
    	}()
    	go func() {
    		os.Exit(<-c)
    	}()
    	runtime.Goexit()
    }
    
    func main() {
    }
    
    /* Before fix:
    
    invalid m->locked = 2
    fatal error: internal lockOSThread error
    
    goroutine 2 [runnable]:
    runtime.MHeap_Scavenger()
    	/Users/rsc/g/go/src/pkg/runtime/mheap.c:438
    runtime.goexit()
    	/Users/rsc/g/go/src/pkg/runtime/proc.c:1313
    created by runtime.main
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 929 bytes
    - Viewed (0)
  7. src/cmd/go/testdata/script/test_fuzz_cleanup.txt

    # Cleanup should run after F.Skip.
    go test -run=FuzzTargetSkip
    stdout cleanup
    
    # Cleanup should run after F.Fatal.
    ! go test -run=FuzzTargetFatal
    stdout cleanup
    
    # Cleanup should run after an unexpected runtime.Goexit.
    ! go test -run=FuzzTargetGoexit
    stdout cleanup
    
    # Cleanup should run after panic.
    ! go test -run=FuzzTargetPanic
    stdout cleanup
    
    # Cleanup should run in fuzz function on seed corpus.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 16 16:53:11 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  8. test/fixedbugs/bug206.go

    main·f+0x26 /home/gri/go/test/bugs/bug206.go:16
    	main·f(0x2b9560, 0x0)
    main·main+0xc3 /home/gri/go/test/bugs/bug206.go:23
    	main·main()
    mainstart+0xf /home/gri/go/src/pkg/runtime/amd64/asm.s:55
    	mainstart()
    goexit /home/gri/go/src/pkg/runtime/proc.c:133
    	goexit()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 31 17:36:45 UTC 2018
    - 1K bytes
    - Viewed (0)
  9. test/fixedbugs/bug286.go

    	runtime.panic(0x0, 0x24e0a0)
    main.main+0xef /home/gri/go1/test/bugs/bug286.go:76
    	main.main()
    mainstart+0xf /home/gri/go1/src/pkg/runtime/amd64/asm.s:60
    	mainstart()
    goexit /home/gri/go1/src/pkg/runtime/proc.c:145
    	goexit()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 1.5K bytes
    - Viewed (0)
  10. src/runtime/panic.go

    // If all other goroutines exit, the program crashes.
    func Goexit() {
    	// Create a panic object for Goexit, so we can recognize when it might be
    	// bypassed by a recover().
    	var p _panic
    	p.goexit = true
    
    	p.start(getcallerpc(), unsafe.Pointer(getcallersp()))
    	for {
    		fn, ok := p.nextDefer()
    		if !ok {
    			break
    		}
    		fn()
    	}
    
    	goexit1()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 43.8K bytes
    - Viewed (0)
Back to top