Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 192 for newTimer (0.19 sec)

  1. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/watch.go

    // and a cleanup function to call when this happens.
    func (w *realTimeoutFactory) TimeoutCh() (<-chan time.Time, func() bool) {
    	if w.timeout == 0 {
    		return neverExitWatch, func() bool { return false }
    	}
    	t := time.NewTimer(w.timeout)
    	return t.C, t.Stop
    }
    
    // serveWatchHandler returns a handle to serve a watch response.
    // TODO: the functionality in this method and in WatchServer.Serve is not cleanly decoupled.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Dec 14 16:37:25 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  2. src/runtime/time.go

    type timeTimer struct {
    	c    unsafe.Pointer // <-chan time.Time
    	init bool
    	timer
    }
    
    // newTimer allocates and returns a new time.Timer or time.Ticker (same layout)
    // with the given parameters.
    //
    //go:linkname newTimer time.newTimer
    func newTimer(when, period int64, f func(arg any, seq uintptr, delay int64), arg any, c *hchan) *timeTimer {
    	t := new(timeTimer)
    	t.timer.init(nil, nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  3. cmd/admin-heal-ops.go

    }
    
    func (ahs *allHealState) periodicHealSeqsClean(ctx context.Context) {
    	// Launch clean-up routine to remove this heal sequence (after
    	// it ends) from the global state after timeout has elapsed.
    	periodicTimer := time.NewTimer(time.Minute * 5)
    	defer periodicTimer.Stop()
    
    	for {
    		select {
    		case <-periodicTimer.C:
    			now := UTCNow()
    			ahs.Lock()
    			for path, h := range ahs.healSeqMap {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 09 18:04:41 UTC 2024
    - 25.1K bytes
    - Viewed (0)
  4. pkg/kubeapiserver/authenticator/config.go

    		return utilerrors.NewAggregate([]error{lastErr, waitErr}) // filters out nil errors
    	}
    
    	oldJWTAuthenticator := c.jwtAuthenticatorPtr.Swap(updatedJWTAuthenticator)
    	go func() {
    		t := time.NewTimer(time.Minute)
    		defer t.Stop()
    		select {
    		case <-c.serverLifecycle.Done():
    		case <-t.C:
    		}
    		// TODO maybe track requests so we know when this is safe to do
    		oldJWTAuthenticator.cancel()
    	}()
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Mar 09 19:29:33 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  5. cmd/erasure-sets.go

    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	time.Sleep(time.Duration(r.Float64() * float64(time.Second)))
    
    	// Pre-emptively connect the disks if possible.
    	s.connectDisks()
    
    	monitor := time.NewTimer(monitorInterval)
    	defer monitor.Stop()
    
    	for {
    		select {
    		case <-ctx.Done():
    			return
    		case <-monitor.C:
    			if serverDebugLog {
    				console.Debugln("running drive monitoring")
    			}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  6. src/net/http/httptest/server.go

    	//
    	// Out of paranoia for making a late change in Go 1.6, we
    	// bound how long this can wait, since golang.org/issue/14291
    	// isn't fully understood yet. At least this should only be used
    	// in tests.
    	timer := time.NewTimer(5 * time.Second)
    	defer timer.Stop()
    	for i := 0; i < nconn; i++ {
    		select {
    		case <-ch:
    		case <-timer.C:
    			// Too slow. Give up.
    			return
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:26:10 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  7. pkg/util/goroutinemap/goroutinemap_test.go

    		Factor:   3,
    		Jitter:   0,
    		Steps:    4,
    	}
    	return wait.ExponentialBackoff(backoff, fn)
    }
    
    func waitChannelWithTimeout(ch <-chan interface{}, timeout time.Duration) error {
    	timer := time.NewTimer(timeout)
    	defer timer.Stop()
    
    	select {
    	case <-ch:
    		// Success!
    		return nil
    	case <-timer.C:
    		return fmt.Errorf("timeout after %v", timeout)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 11 14:09:48 UTC 2017
    - 14.9K bytes
    - Viewed (0)
  8. cmd/background-newdisks-heal-ops.go

    func monitorLocalDisksAndHeal(ctx context.Context, z *erasureServerPools) {
    	// Perform automatic disk healing when a disk is replaced locally.
    	diskCheckTimer := time.NewTimer(defaultMonitorNewDiskInterval)
    	defer diskCheckTimer.Stop()
    
    	for {
    		select {
    		case <-ctx.Done():
    			return
    		case <-diskCheckTimer.C:
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue Jun 04 15:12:32 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  9. cmd/tier.go

    	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.
    	t := time.NewTimer(tierCfgRefresh + randInterval())
    	defer t.Stop()
    	for {
    		select {
    		case <-ctx.Done():
    			return
    		case <-t.C:
    			err := config.Reload(ctx, objAPI)
    			if err != nil {
    				tierLogIf(ctx, err)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu May 09 08:44:07 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  10. src/crypto/tls/handshake_test.go

    	defer localListener.mu.Unlock()
    
    	addr := localListener.addr
    
    	var err error
    Dialing:
    	// We expect a rare mismatch, but probably not 5 in a row.
    	for i := 0; i < 5; i++ {
    		tooSlow := time.NewTimer(1 * time.Second)
    		defer tooSlow.Stop()
    		var c1 net.Conn
    		c1, err = net.Dial(addr.Network(), addr.String())
    		if err != nil {
    			if runtime.GOOS == "dragonfly" && (isConnRefused(err) || os.IsTimeout(err)) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 24.5K bytes
    - Viewed (0)
Back to top