- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for NewSource (0.11 sec)
-
internal/grid/benchmark_test.go
return &testResponse{ OrgNum: req.Num, OrgString: req.String, Embedded: *req, }, nil })) errFatal(err) } const payloadSize = 512 rng := rand.New(rand.NewSource(time.Now().UnixNano())) payload := make([]byte, payloadSize) _, err = rng.Read(payload) errFatal(err) // Wait for all to connect // Parallel writes per server. b.Run("bytes", func(b *testing.B) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jun 07 15:51:52 UTC 2024 - 15.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
val buffer = Buffer() /** * Reference count of the number of active sources reading this stream. When decremented to 0 * resources are released and all following calls to [.newSource] return null. Guarded by this. */ var sourceCount = 0 val isClosed: Boolean get() = file == null @Throws(IOException::class) private fun writeHeader( prefix: ByteString,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.8K bytes - Viewed (0) -
cmd/erasure.go
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Oct 04 22:23:33 UTC 2024 - 16.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt
} } } /** * Returns an unbuffered input stream to read the last committed value, or null if no value has * been committed. */ fun newSource(index: Int): Source? { synchronized(this@DiskLruCache) { check(!done) if (!entry.readable || entry.currentEditor != this || entry.zombie) { return null } return try {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 34.7K bytes - Viewed (0) -
internal/ringbuffer/ring_buffer_test.go
doSleep := !testing.Short() rb := New(4 << 10).SetBlocking(true) // Reader var readErr error var wg sync.WaitGroup wg.Add(1) go func() { readRng := rand.New(rand.NewSource(1)) defer wg.Done() defer rb.CloseWithError(readErr) buf := make([]byte, 1024) for { // Read n, err := rb.Read(buf[:readRng.Intn(len(buf))]) readBytes += n read.Write(buf[:n])
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 26.8K bytes - Viewed (0) -
cmd/local-locker_test.go
} if len(l.lockUID) != 0 { t.Fatalf("lockUID len, got %d, want %d + %d", len(l.lockUID), 0, 0) } } func Test_localLocker_expireOldLocksExpire(t *testing.T) { rng := rand.New(rand.NewSource(0)) quorum := 0 // Numbers of unique locks for _, locks := range []int{100, 1000, 1e6} { if testing.Short() && locks > 100 { continue } t.Run(fmt.Sprintf("%d-locks", locks), func(t *testing.T) {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jul 24 10:24:01 UTC 2024 - 11.9K bytes - Viewed (0) -
cmd/object-api-utils.go
return hosts } // returns an online host (and corresponding port) from a slice of DNS records func getHostFromSrv(records []dns.SrvRecord) (host string) { hosts := getHostsSlice(records) rng := rand.New(rand.NewSource(time.Now().UTC().UnixNano())) var d net.Dialer var retry int for retry < len(hosts) { ctx, cancel := context.WithTimeout(GlobalContext, 300*time.Millisecond) host = hosts[rng.Intn(len(hosts))]
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 08 15:29:58 UTC 2024 - 37.1K bytes - Viewed (0) -
cmd/batch-rotate.go
retryAttempts = batchKeyRotateJobDefaultRetries } delay := job.KeyRotate.Flags.Retry.Delay if delay <= 0 { delay = batchKeyRotateJobDefaultRetryDelay } rnd := rand.New(rand.NewSource(time.Now().UnixNano())) selectObj := func(info FileInfo) (ok bool) { if r.Flags.Filter.OlderThan > 0 && time.Since(info.ModTime) < r.Flags.Filter.OlderThan {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 18 17:59:03 UTC 2024 - 14.7K bytes - Viewed (0) -
cmd/tier.go
Tiers: make(map[string]madmin.TierConfig), } } func (config *TierConfigMgr) refreshTierConfig(ctx context.Context, objAPI ObjectLayer) { const tierCfgRefresh = 15 * time.Minute r := rand.New(rand.NewSource(time.Now().UnixNano())) randInterval := func() time.Duration { return time.Duration(r.Float64() * 5 * float64(time.Second)) } // To avoid all MinIO nodes reading the tier config object at the same // time.
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 12 20:44:05 UTC 2024 - 15.7K bytes - Viewed (0) -
cmd/server-main.go
return } globalTrace.Publish(info) } func initServerConfig(ctx context.Context, newObject ObjectLayer) error { t1 := time.Now() r := rand.New(rand.NewSource(time.Now().UnixNano())) for { select { case <-ctx.Done(): // Retry was canceled successfully. return fmt.Errorf("Initializing sub-systems stopped gracefully %w", ctx.Err()) default: }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 24 21:50:11 UTC 2024 - 35.2K bytes - Viewed (1)