- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for Intn (0.1 sec)
-
src/cmd/go/internal/lockedfile/transform_test.go
for n := attempts; n > 0; n-- { sem <- true go func() { defer func() { <-sem }() time.Sleep(time.Duration(rand.Intn(100)) * time.Microsecond) chunkWords := roundDownToPowerOf2(rand.Intn(maxChunkWords) + 1) offset := rand.Intn(chunkWords) err := lockedfile.Transform(path, func(data []byte) (chunk []byte, err error) { chunk = buf[offset*8 : (offset+chunkWords)*8]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 06 22:37:50 UTC 2023 - 2.3K bytes - Viewed (0) -
src/cmd/go/internal/work/exec_test.go
rng := rand.New(rand.NewSource(seed)) for i := 0; i < 50; i++ { // Generate a random string of runes. buf.Reset() for buf.Len() < sys.ExecArgLengthLimit+1 { var r rune for { r = rune(rng.Intn(utf8.MaxRune + 1)) if utf8.ValidRune(r) { break } } fmt.Fprintf(buf, "%c", r) } arg := buf.String() if got := objabi.DecodeArg(encodeArg(arg)); got != arg {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Oct 02 13:15:42 UTC 2021 - 1.8K bytes - Viewed (0) -
api/go1.22.txt
pkg math/rand/v2, func Int32() int32 #61716 pkg math/rand/v2, func Int32N(int32) int32 #61716 pkg math/rand/v2, func Int64() int64 #61716 pkg math/rand/v2, func Int64N(int64) int64 #61716 pkg math/rand/v2, func IntN(int) int #61716 pkg math/rand/v2, func N[$0 intType]($0) $0 #61716 pkg math/rand/v2, func New(Source) *Rand #61716 pkg math/rand/v2, func NewChaCha8([32]uint8) *ChaCha8 #61716
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 24 20:54:27 UTC 2024 - 7.7K bytes - Viewed (0) -
src/cmd/go/internal/par/work.go
w.wait.Wait() w.waiting-- } // Pick something to do at random, // to eliminate pathological contention // in case items added at about the same time // are most likely to contend. i := rand.Intn(len(w.todo)) item := w.todo[i] w.todo[i] = w.todo[len(w.todo)-1] w.todo = w.todo[:len(w.todo)-1] w.mu.Unlock() w.f(item) } } // ErrCache is like Cache except that it also stores
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 13 15:54:54 UTC 2024 - 4.3K bytes - Viewed (0) -
src/container/heap/heap_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 3.4K bytes - Viewed (0)