Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for setMaxThreads (0.17 sec)

  1. src/runtime/debug/garbage.go

    // or are locked to other goroutines due to use of runtime.LockOSThread.
    //
    // SetMaxThreads is useful mainly for limiting the damage done by
    // programs that create an unbounded number of threads. The idea is
    // to take down the program before it takes down the operating system.
    func SetMaxThreads(threads int) int {
    	return setMaxThreads(threads)
    }
    
    // SetPanicOnFault controls the runtime's behavior when a program faults
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. cmd/server-rlimit.go

    	sysMaxThreads, err := sys.GetMaxThreads()
    	if err == nil {
    		minioMaxThreads := (sysMaxThreads * 90) / 100
    		// Only set max threads if it is greater than the default one
    		if minioMaxThreads > 10000 {
    			debug.SetMaxThreads(minioMaxThreads)
    		}
    	}
    
    	var maxLimit uint64
    
    	// Set open files limit to maximum.
    	if _, maxLimit, err = sys.GetMaxOpenFileLimit(); err != nil {
    		return err
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 30 11:58:12 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  3. src/os/os_test.go

    		if err != nil {
    			for j := 0; j < i; j++ {
    				r[j].Close()
    				w[j].Close()
    			}
    			t.Fatal(err)
    		}
    		r[i] = rp
    		w[i] = wp
    	}
    
    	defer debug.SetMaxThreads(debug.SetMaxThreads(threads / 2))
    
    	creading := make(chan bool, threads)
    	cdone := make(chan bool, threads)
    	for i := 0; i < threads; i++ {
    		go func(i int) {
    			var b [1]byte
    			creading <- true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 83.1K bytes
    - Viewed (0)
  4. src/runtime/proc.go

    func (l *gList) pop() *g {
    	gp := l.head.ptr()
    	if gp != nil {
    		l.head = gp.schedlink
    	}
    	return gp
    }
    
    //go:linkname setMaxThreads runtime/debug.setMaxThreads
    func setMaxThreads(in int) (out int) {
    	lock(&sched.lock)
    	out = int(sched.maxmcount)
    	if in > 0x7fffffff { // MaxInt32
    		sched.maxmcount = 0x7fffffff
    	} else {
    		sched.maxmcount = int32(in)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 207.5K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"ParseBuildInfo", Func, 18},
    		{"PrintStack", Func, 0},
    		{"ReadBuildInfo", Func, 12},
    		{"ReadGCStats", Func, 1},
    		{"SetGCPercent", Func, 1},
    		{"SetMaxStack", Func, 2},
    		{"SetMaxThreads", Func, 2},
    		{"SetMemoryLimit", Func, 19},
    		{"SetPanicOnFault", Func, 3},
    		{"SetTraceback", Func, 6},
    		{"Stack", Func, 0},
    		{"WriteHeapDump", Func, 3},
    	},
    	"runtime/metrics": {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top