Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 94 for gopark (0.41 sec)

  1. src/runtime/select.go

    	// wait for someone to wake us up
    	gp.param = nil
    	// Signal to anyone trying to shrink our stack that we're about
    	// to park on a channel. The window between when this G's status
    	// changes and when we set gp.activeStackChans is not safe for
    	// stack shrinking.
    	gp.parkingOnChan.Store(true)
    	gopark(selparkcommit, nil, waitReasonSelect, traceBlockSelect, 1)
    	gp.activeStackChans = false
    
    	sellock(scases, lockorder)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 13 21:36:04 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. src/runtime/chan.go

    	gp.param = nil
    	c.sendq.enqueue(mysg)
    	// Signal to anyone trying to shrink our stack that we're about
    	// to park on a channel. The window between when this G's status
    	// changes and when we set gp.activeStackChans is not safe for
    	// stack shrinking.
    	gp.parkingOnChan.Store(true)
    	gopark(chanparkcommit, unsafe.Pointer(&c.lock), waitReasonChanSend, traceBlockChanSend, 2)
    	// Ensure the value being sent is kept alive until the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  3. src/runtime/HACKING.md

    the P to be reused to run another G. This is still less efficient than
    blocking the G directly since it consumes an M.
    
    To interact directly with the goroutine scheduler, use `gopark` and
    `goready`. `gopark` parks the current goroutine—putting it in the
    "waiting" state and removing it from the scheduler's run queue—and
    schedules another goroutine on the current M/P. `goready` puts a
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  4. src/runtime/traceruntime.go

    }
    
    // GoPark emits a GoBlock event with the provided reason.
    //
    // TODO(mknyszek): Replace traceBlockReason with waitReason. It's silly
    // that we have both, and waitReason is way more descriptive.
    func (tl traceLocker) GoPark(reason traceBlockReason, skip int) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 25.7K bytes
    - Viewed (0)
  5. src/runtime/runtime-gdb.py

    	# int(pc) will not work.
    	try:
    		# python3 / newer versions of gdb
    		pc = int(pc)
    	except gdb.error:
    		# str(pc) can return things like
    		# "0x429d6c <runtime.gopark+284>", so
    		# chop at first space.
    		pc = int(str(pc).split(None, 1)[0], 16)
    	return pc
    
    
    #
    #  For reference, this is what we're trying to do:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 10 12:59:20 UTC 2023
    - 15.4K bytes
    - Viewed (0)
  6. src/runtime/mfinal.go

    		framecap uintptr
    		argRegs  int
    	)
    
    	gp := getg()
    	lock(&finlock)
    	fing = gp
    	unlock(&finlock)
    
    	for {
    		lock(&finlock)
    		fb := finq
    		finq = nil
    		if fb == nil {
    			gopark(finalizercommit, unsafe.Pointer(&finlock), waitReasonFinalizerWait, traceBlockSystemGoroutine, 1)
    			continue
    		}
    		argRegs = intArgRegs
    		unlock(&finlock)
    		if raceenabled {
    			racefingo()
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 01:56:56 UTC 2024
    - 19K bytes
    - Viewed (0)
  7. src/runtime/netpoll.go

    // pollDesc contains 2 binary semaphores, rg and wg, to park reader and writer
    // goroutines respectively. The semaphore can be in the following states:
    //
    //	pdReady - io readiness notification is pending;
    //	          a goroutine consumes the notification by changing the state to pdNil.
    //	pdWait - a goroutine prepares to park on the semaphore, but not yet parked;
    //	         the goroutine commits to park by changing the state to G pointer,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  8. src/runtime/runtime2.go

    //
    // goarm should be an internal detail,
    // but widely used packages access it using linkname.
    // Notable members of the hall of shame include:
    //   - github.com/creativeprojects/go-selfupdate
    //
    // Do not remove or change the type signature.
    // See go.dev/issue/67401.
    //
    //go:linkname goarm
    var (
    	goarm       uint8
    	goarmsoftfp uint8
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:57:37 UTC 2024
    - 47.9K bytes
    - Viewed (0)
  9. src/runtime/trace.go

    // returned data before calling ReadTrace again.
    // ReadTrace must be called from one goroutine at a time.
    func ReadTrace() []byte {
    top:
    	var buf []byte
    	var park bool
    	systemstack(func() {
    		buf, park = readTrace0()
    	})
    	if park {
    		gopark(func(gp *g, _ unsafe.Pointer) bool {
    			if !trace.reader.CompareAndSwapNoWB(nil, gp) {
    				// We're racing with another reader.
    				// Wake up and handle this case.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 37.1K bytes
    - Viewed (0)
  10. src/runtime/stack.go

    	// safe-point because we don't have precise pointer maps for
    	// all frames.
    	if gp.asyncSafePoint {
    		return false
    	}
    	// We also can't *shrink* the stack in the window between the
    	// goroutine calling gopark to park on a channel and
    	// gp.activeStackChans being set.
    	if gp.parkingOnChan.Load() {
    		return false
    	}
    	// We also can't copy the stack while tracing is enabled, and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 41.1K bytes
    - Viewed (0)
Back to top