Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 162 for newResource (0.17 sec)

  1. 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: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 34.7K bytes
    - Viewed (0)
  2. security/pkg/pki/ca/selfsignedcarootcertrotator.go

    		ca:                 ca,
    		onRootCertUpdate:   onRootCertUpdate,
    	}
    	if config.enableJitter {
    		// Select a back off time in seconds, which is in the range of [0, rotator.config.CheckInterval).
    		randSource := rand.NewSource(time.Now().UnixNano())
    		randBackOff := rand.New(randSource)
    		backOffSeconds := int(time.Duration(randBackOff.Int63n(int64(rotator.config.CheckInterval))).Seconds())
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 30 19:33:26 UTC 2023
    - 10.4K bytes
    - Viewed (0)
  3. src/syscall/exec_unix_test.go

    	// and we are going to call syscall.Exec anyhow.
    	os.Setenv("GO_WANT_HELPER_PROCESS", "3")
    
    	stop := time.Now().Add(time.Second)
    	for i := 0; i < 100; i++ {
    		go func(i int) {
    			r := rand.New(rand.NewSource(int64(i)))
    			for time.Now().Before(stop) {
    				r.Uint64()
    			}
    		}(i)
    	}
    
    	time.Sleep(10 * time.Millisecond)
    
    	argv := []string{os.Args[0], "-test.run=^TestExecHelper$"}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 04:41:27 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  4. 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
    		}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jan 18 07:03:17 UTC 2024
    - 8.9K bytes
    - Viewed (1)
  5. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        setUp(parameters.first, parameters.second)
        val creator = cache.edit("k1")!!
        creator.setString(0, "ABC")
        creator.setString(1, "DE")
        assertThat(creator.newSource(0)).isNull()
        assertThat(creator.newSource(1)).isNull()
        creator.commit()
        val snapshot = cache["k1"]!!
        snapshot.assertValue(0, "ABC")
        snapshot.assertValue(1, "DE")
      }
    
      @ParameterizedTest
    Registered: Sun Jun 16 04:42:17 UTC 2024
    - Last Modified: Mon Apr 15 14:55:09 UTC 2024
    - 75.8K bytes
    - Viewed (0)
  6. src/os/readfrom_linux_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	t.Cleanup(func() { dst.Close() })
    
    	// Populate the source file with data, then rewind it, so it can be
    	// consumed by copy_file_range(2).
    	prng := rand.New(rand.NewSource(time.Now().Unix()))
    	data = make([]byte, size)
    	prng.Read(data)
    	if _, err := src.Write(data); err != nil {
    		t.Fatal(err)
    	}
    	if _, err := src.Seek(0, io.SeekStart); err != nil {
    		t.Fatal(err)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  7. src/image/jpeg/dct_test.go

    	benchmarkDCT(b, idct)
    }
    
    func TestDCT(t *testing.T) {
    	blocks := make([]block, len(testBlocks))
    	copy(blocks, testBlocks[:])
    
    	// Append some randomly generated blocks of varying sparseness.
    	r := rand.New(rand.NewSource(123))
    	for i := 0; i < 100; i++ {
    		b := block{}
    		n := r.Int() % 64
    		for j := 0; j < n; j++ {
    			b[r.Int()%len(b)] = r.Int31() % 256
    		}
    		blocks = append(blocks, b)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:49:30 UTC 2022
    - 8.6K bytes
    - Viewed (0)
  8. 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 Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 11 03:13:30 UTC 2024
    - 36.3K bytes
    - Viewed (0)
  9. src/sync/map_test.go

    	}
    
    	done := make(chan struct{})
    	var wg sync.WaitGroup
    	defer func() {
    		close(done)
    		wg.Wait()
    	}()
    	for g := int64(runtime.GOMAXPROCS(0)); g > 0; g-- {
    		r := rand.New(rand.NewSource(g))
    		wg.Add(1)
    		go func(g int64) {
    			defer wg.Done()
    			for i := int64(0); ; i++ {
    				select {
    				case <-done:
    					return
    				default:
    				}
    				for n := int64(1); n < mapSize; n++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 01 15:34:22 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  10. pkg/util/tolerations/tolerations_test.go

    				assert.Equal(t, expect, actual[i], "expected[%d] = %s", i, test.expected[i])
    			}
    		})
    	}
    }
    
    func TestFuzzed(t *testing.T) {
    	r := rand.New(rand.NewSource(1234)) // Fixed source to prevent flakes.
    
    	const (
    		allProbability               = 0.01 // Chance of getting a tolerate all
    		existsProbability            = 0.3
    		tolerationSecondsProbability = 0.5
    	)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 26 22:25:49 UTC 2019
    - 11.4K bytes
    - Viewed (0)
Back to top