Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/runtime/debug.go

    		n = 1 // WebAssembly has no threads yet, so only one CPU is possible.
    	}
    
    	lock(&sched.lock)
    	ret := int(gomaxprocs)
    	unlock(&sched.lock)
    	if n <= 0 || n == ret {
    		return ret
    	}
    
    	stw := stopTheWorldGC(stwGOMAXPROCS)
    
    	// newprocs will be processed by startTheWorld
    	newprocs = int32(n)
    
    	startTheWorldGC(stw)
    	return ret
    }
    
    // NumCPU returns the number of logical CPUs usable by the current process.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 11 20:38:24 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. src/runtime/proc.go

    	releasem(mp)
    }
    
    // stopTheWorldGC has the same effect as stopTheWorld, but blocks
    // until the GC is not running. It also blocks a GC from starting
    // until startTheWorldGC is called.
    func stopTheWorldGC(reason stwReason) worldStop {
    	semacquire(&gcsema)
    	return stopTheWorld(reason)
    }
    
    // startTheWorldGC undoes the effects of stopTheWorldGC.
    //
    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