- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 40 for NewSource (0.22 sec)
-
okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt
} @Test fun multipleSources() { val upstream = Buffer() upstream.writeUtf8("abcdefghijklm") val relay = edit(file, upstream, metadata, 1024) val source1 = relay.newSource()!!.buffer() val source2 = relay.newSource()!!.buffer() assertThat(source1.readUtf8()).isEqualTo("abcdefghijklm") assertThat(source2.readUtf8()).isEqualTo("abcdefghijklm") source1.close() source2.close()
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 8.1K bytes - Viewed (0) -
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) {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Tue Nov 21 01:09:35 GMT 2023 - 12.2K bytes - Viewed (0) -
cmd/erasure-common.go
"time" "github.com/minio/pkg/v2/sync/errgroup" ) func (er erasureObjects) getOnlineDisks() (newDisks []StorageAPI) { disks := er.getDisks() var wg sync.WaitGroup var mu sync.Mutex r := rand.New(rand.NewSource(time.Now().UnixNano())) for _, i := range r.Perm(len(disks)) { i := i wg.Add(1) go func() { defer wg.Done() if disks[i] == nil { return }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 4.6K 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,
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.8K bytes - Viewed (0) -
cmd/erasure.go
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Apr 15 10:02:39 GMT 2024 - 16K bytes - Viewed (1) -
cmd/license-update.go
) // initlicenseUpdateJob start the periodic license update job in the background. func initLicenseUpdateJob(ctx context.Context, objAPI ObjectLayer) { go func() { r := rand.New(rand.NewSource(time.Now().UnixNano())) // Leader node (that successfully acquires the lock inside licenceUpdaterLoop) // will keep performing the license update. If the leader goes down for some
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 3.3K 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)) // 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) {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Sun Mar 05 04:57:35 GMT 2023 - 11.8K bytes - Viewed (0) -
cmd/callhome.go
// initCallhome will start the callhome task in the background. func initCallhome(ctx context.Context, objAPI ObjectLayer) { if !globalCallhomeConfig.Enabled() { return } go func() { r := rand.New(rand.NewSource(time.Now().UnixNano())) // Leader node (that successfully acquires the lock inside runCallhome) // will keep performing the callhome. If the leader goes down for some reason,
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 5.1K bytes - Viewed (1) -
internal/s3select/select_benchmark_test.go
"time" humanize "github.com/dustin/go-humanize" ) const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" func newRandString(length int) string { randSrc := rand.New(rand.NewSource(time.Now().UnixNano())) b := make([]byte, length) for i := range b { b[i] = charset[randSrc.Intn(len(charset))] } return string(b) } func genSampleCSVData(count int) []byte {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 14 13:54:47 GMT 2022 - 5K bytes - Viewed (0) -
internal/lsync/lrwmutex.go
// timing randomized back-off algorithm to try again until successful func (lm *LRWMutex) lockLoop(ctx context.Context, id, source string, timeout time.Duration, isWriteLock bool) (locked bool) { r := rand.New(rand.NewSource(time.Now().UnixNano())) retryCtx, cancel := context.WithTimeout(ctx, timeout) defer cancel() for { select { case <-retryCtx.Done(): // Caller context canceled or we timedout,
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Sun Jan 02 17:15:06 GMT 2022 - 4.8K bytes - Viewed (0)