Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for goexit0 (0.13 sec)

  1. src/runtime/preempt.go

    			throw("invalid g status")
    
    		case _Gdead:
    			// Nothing to suspend.
    			//
    			// preemptStop may need to be cleared, but
    			// doing that here could race with goroutine
    			// reuse. Instead, goexit0 clears it.
    			return suspendGState{dead: true}
    
    		case _Gcopystack:
    			// The stack is being copied. We need to wait
    			// until this is done.
    
    		case _Gpreempted:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 15.1K bytes
    - Viewed (0)
  2. src/iter/pull_test.go

    	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() {
    			next, stop = Pull2(goexitSeq2())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 19:09:28 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  3. src/runtime/proc.go

    	schedule()
    }
    
    // Finishes execution of the current goroutine.
    func goexit1() {
    	if raceenabled {
    		racegoend()
    	}
    	trace := traceAcquire()
    	if trace.ok() {
    		trace.GoEnd()
    		traceRelease(trace)
    	}
    	mcall(goexit0)
    }
    
    // goexit continuation on g0.
    func goexit0(gp *g) {
    	gdestroy(gp)
    	schedule()
    }
    
    func gdestroy(gp *g) {
    	mp := getg().m
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. src/testing/panic_test.go

    	testCases := []struct {
    		desc  string
    		flags []string
    		want  string
    	}{
    		{
    			desc:  "Issue 48502: call runtime.Goexit in t.Cleanup after panic",
    			flags: []string{"-test.run=^TestGoexitInCleanupAfterPanicHelper$"},
    			want: `panic: die
    	panic: test executed panic(nil) or runtime.Goexit`,
    		},
    		{
    			desc:  "Issue 48515: call t.Run in t.Cleanup should trigger panic",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 27 16:49:24 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  8. src/cmd/internal/objabi/funcid.go

    	"corostart":          abi.FuncID_corostart,
    	"debugCallV2":        abi.FuncID_debugCallV2,
    	"gcBgMarkWorker":     abi.FuncID_gcBgMarkWorker,
    	"rt0_go":             abi.FuncID_rt0_go,
    	"goexit":             abi.FuncID_goexit,
    	"gogo":               abi.FuncID_gogo,
    	"gopanic":            abi.FuncID_gopanic,
    	"handleAsyncEvent":   abi.FuncID_handleAsyncEvent,
    	"main":               abi.FuncID_runtime_main,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 06 21:33:59 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  9. src/runtime/crash_test.go

    	want := "no goroutines (main called runtime.Goexit) - deadlock!"
    	if !strings.Contains(output, want) {
    		t.Fatalf("output:\n%s\n\nwant output containing: %s", output, want)
    	}
    }
    
    func TestGoexitDefer(t *testing.T) {
    	c := make(chan struct{})
    	go func() {
    		defer func() {
    			r := recover()
    			if r != nil {
    				t.Errorf("non-nil recover during Goexit")
    			}
    			c <- struct{}{}
    		}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 19:46:10 UTC 2024
    - 27K bytes
    - Viewed (0)
  10. src/sync/oncefunc_test.go

    			return
    		}
    		t.Fatalf("%s: want nil panic, got %v", label, p)
    	})
    }
    
    func TestOnceFuncGoexit(t *testing.T) {
    	// If f calls Goexit, the results are unspecified. But check that f doesn't
    	// get called twice.
    	calls := 0
    	f := sync.OnceFunc(func() {
    		calls++
    		runtime.Goexit()
    	})
    	var wg sync.WaitGroup
    	for i := 0; i < 2; i++ {
    		wg.Add(1)
    		go func() {
    			defer wg.Done()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:31:33 UTC 2023
    - 6.9K bytes
    - Viewed (0)
Back to top