Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 285 for goexits (0.25 sec)

  1. src/iter/pull_test.go

    func goexitSeq() Seq[int] {
    	return func(yield func(int) bool) {
    		runtime.Goexit()
    	}
    }
    
    func goexitCleanupSeq() Seq[int] {
    	return func(yield func(int) bool) {
    		for {
    			if !yield(55) {
    				runtime.Goexit()
    			}
    		}
    	}
    }
    
    func TestPull2Goexit(t *testing.T) {
    	t.Run("next", func(t *testing.T) {
    		var next func() (int, int, bool)
    		var stop func()
    		if !goexits(t, func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  2. 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)
  3. src/runtime/os_plan9.go

    	if ns == 0 {
    		return scratch
    	}
    	return ns
    }
    
    var goexits = []byte("go: exit ")
    var emptystatus = []byte("\x00")
    var exiting uint32
    
    func goexitsall(status *byte) {
    	var buf [_ERRMAX]byte
    	if !atomic.Cas(&exiting, 0, 1) {
    		return
    	}
    	getg().m.locks++
    	n := copy(buf[:], goexits)
    	n = copy(buf[n:], gostringnocopy(status))
    	pid := getpid()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  4. test/fixedbugs/issue11256.go

    			var buf [1024]byte
    			buf[0]++
    			for atomic.LoadInt32(&done) == 0 {
    				runtime.Gosched()
    			}
    			atomic.StoreInt32(&done, 0)
    			// Exit without unwinding stack barriers.
    			runtime.Goexit()
    		}()
    
    		// Generate some garbage.
    		x[i] = make([]byte, 1024*1024)
    
    		// Give GC some time to install stack barriers in the G.
    		time.Sleep(50 * time.Microsecond)
    		atomic.StoreInt32(&done, 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 29 15:02:30 UTC 2015
    - 1.1K bytes
    - Viewed (0)
  5. src/cmd/go/testdata/script/test_fuzz_mutate_fail.txt

    }
    
    func FuzzNilPanic(f *testing.F) {
    	if isWorker() {
    		panic(nil)
    	}
    	f.Fuzz(func(*testing.T, []byte) {})
    }
    
    func FuzzGoexit(f *testing.F) {
    	if isWorker() {
    		runtime.Goexit()
    	}
    	f.Fuzz(func(*testing.T, []byte) {})
    }
    
    func FuzzExit(f *testing.F) {
    	if isWorker() {
    		os.Exit(99)
    	}
    	f.Fuzz(func(*testing.T, []byte) {})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 16 16:53:11 UTC 2023
    - 1.5K bytes
    - Viewed (0)
  6. src/cmd/dist/util.go

    	bghelpers.Wait()
    
    	xexit(2)
    }
    
    var atexits []func()
    
    // xexit exits the process with return code n.
    func xexit(n int) {
    	for i := len(atexits) - 1; i >= 0; i-- {
    		atexits[i]()
    	}
    	os.Exit(n)
    }
    
    // xatexit schedules the exit-handler f to be run when the program exits.
    func xatexit(f func()) {
    	atexits = append(atexits, f)
    }
    
    // xprintf prints a message to standard output.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 17:50:29 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  7. 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)
  8. src/runtime/stubs.go

    type neverCallThisFunction struct{}
    
    // goexit is the return stub at the top of every goroutine call stack.
    // Each goroutine stack is constructed as if goexit called the
    // goroutine's entry point function, so that when the entry point
    // function returns, it will return to goexit, which will call goexit1
    // to perform the actual exit.
    //
    // This function must never be called directly. Call goexit1 instead.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 20.2K bytes
    - Viewed (0)
  9. 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)
  10. src/cmd/go/testdata/script/test_fuzz.txt

    # Test that calling f.Fatal in a fuzz target causes a non-zero exit status.
    ! go test fatal_fuzz_test.go
    ! stdout ^ok
    stdout FAIL
    
    # Test that successful test exits cleanly.
    go test success_fuzz_test.go
    stdout ^ok
    ! stdout FAIL
    
    # Test that successful fuzzing exits cleanly.
    go test -fuzz=Fuzz -fuzztime=1x success_fuzz_test.go
    stdout ok
    ! stdout FAIL
    
    # Test that calling f.Fatal while fuzzing causes a non-zero exit status.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 16 16:53:11 UTC 2023
    - 10.2K bytes
    - Viewed (0)
Back to top