- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for setMaxThreads (0.28 sec)
-
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) -
src/runtime/debug/stubs.go
import ( "time" ) // Implemented in package runtime. func readGCStats(*[]time.Duration) func freeOSMemory() func setMaxStack(int) int func setGCPercent(int32) int32 func setPanicOnFault(bool) bool func setMaxThreads(int) int
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 03 15:12:04 UTC 2022 - 435 bytes - Viewed (0) -
src/runtime/debug/garbage_test.go
// // This can only happen when ints are 64 bits, since on platforms // with 32 bit ints SetMaxThreads (which takes an int parameter) // cannot be given anything that will overflow an int32. // // Call SetMaxThreads with 1<<31, but only on 64 bit systems. nt := SetMaxThreads(1 << (30 + ^uint(0)>>63)) SetMaxThreads(nt) // restore previous value
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 19 14:30:00 UTC 2023 - 7.2K bytes - Viewed (0) -
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) -
src/runtime/testdata/testprog/deadlock.go
} func StackOverflow() { var f func() byte f = func() byte { var buf [64 << 10]byte return buf[0] + f() } debug.SetMaxStack(1474560) f() } func ThreadExhaustion() { debug.SetMaxThreads(10) c := make(chan int) for i := 0; i < 100; i++ { go func() { runtime.LockOSThread() c <- 0 select {} }() <-c } } func RecursivePanic() { func() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 27 20:44:24 UTC 2021 - 6.5K bytes - Viewed (0) -
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) -
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) -
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) -
api/go1.2.txt
pkg reflect, method (Value) Slice3(int, int, int) Value pkg runtime, type MemStats struct, GCSys uint64 pkg runtime, type MemStats struct, OtherSys uint64 pkg runtime/debug, func SetMaxStack(int) int pkg runtime/debug, func SetMaxThreads(int) int pkg sort, func Stable(Interface) pkg strings, func IndexByte(string, uint8) int pkg sync/atomic, func SwapInt32(*int32, int32) int32 pkg sync/atomic, func SwapInt64(*int64, int64) int64
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 18 04:36:59 UTC 2013 - 1.9M bytes - Viewed (0)