- Sort Score
- Result 10 results
- Languages All
Results 1 - 7 of 7 for NewSource (0.19 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 May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 8.1K 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 May 05 19:28:20 GMT 2024 - Last Modified: Sun Apr 28 17:53:50 GMT 2024 - 4.6K bytes - Viewed (0) -
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 May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 3.3K bytes - Viewed (0) -
cmd/dynamic-timeouts_test.go
// Race test. timeout := newDynamicTimeout(time.Second, time.Millisecond) var wg sync.WaitGroup for i := 0; i < runtime.GOMAXPROCS(0); i++ { wg.Add(1) rng := rand.New(rand.NewSource(int64(i))) go func() { defer wg.Done() for i := 0; i < 100; i++ { for j := 0; j < 100; j++ { timeout.LogSuccess(time.Duration(float64(time.Second) * rng.Float64())) }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Fri Oct 14 10:08:40 GMT 2022 - 5.4K 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 May 05 19:28:20 GMT 2024 - Last Modified: Thu Apr 04 12:04:40 GMT 2024 - 5.1K bytes - Viewed (1) -
cmd/erasure-metadata-utils_test.go
testShuffleDisks(t, z) } func Test_hashOrder(t *testing.T) { for x := 1; x < 17; x++ { t.Run(fmt.Sprintf("%d", x), func(t *testing.T) { var first [17]int rng := rand.New(rand.NewSource(0)) var tmp [16]byte rng.Read(tmp[:]) prefix := hex.EncodeToString(tmp[:]) for i := 0; i < 10000; i++ { rng.Read(tmp[:])
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 7.4K bytes - Viewed (0) -
cmd/site-replication-utils.go
peerResyncMap: make(map[string]resyncState), } go s.save(ctx) go s.init(ctx) return &s } // init site resync metrics func (sm *siteResyncMetrics) init(ctx context.Context) { r := rand.New(rand.NewSource(time.Now().UnixNano())) // Run the site resync metrics load in a loop for { if err := sm.load(ctx, newObjectLayerFn()); err == nil { <-ctx.Done() return }
Go - Registered: Sun May 05 19:28:20 GMT 2024 - Last Modified: Thu Jan 18 07:03:17 GMT 2024 - 8.9K bytes - Viewed (1)