Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for goschedIfBusy (0.12 sec)

  1. src/runtime/mgcsweep.go

    		const sweepBatchSize = 10
    		nSwept := 0
    		for sweepone() != ^uintptr(0) {
    			nSwept++
    			if nSwept%sweepBatchSize == 0 {
    				goschedIfBusy()
    			}
    		}
    		for freeSomeWbufs(true) {
    			// N.B. freeSomeWbufs is already batched internally.
    			goschedIfBusy()
    		}
    		lock(&sweep.lock)
    		if !isSweepDone() {
    			// This can happen if a GC runs between
    			// gosweepone returning ^0 above
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:52:18 UTC 2024
    - 32.9K bytes
    - Viewed (0)
  2. src/runtime/proc.go

    //
    //go:nosplit
    func goschedguarded() {
    	mcall(goschedguarded_m)
    }
    
    // goschedIfBusy yields the processor like gosched, but only does so if
    // there are no idle Ps or if we're on the only P and there's nothing in
    // the run queue. In both cases, there is freely available idle time.
    //
    //go:nosplit
    func goschedIfBusy() {
    	gp := getg()
    	// Call gosched if gp.preempt is set; we may be in a tight loop that
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
Back to top