Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 175 for newTimer (0.15 sec)

  1. src/net/timeout_test.go

    		if err := ln.(*TCPListener).SetDeadline(time.Now().Add(-5 * time.Second)); err != nil {
    			t.Error(err)
    		}
    		if err := ln.(*TCPListener).SetDeadline(noDeadline); err != nil {
    			t.Error(err)
    		}
    		maxch <- time.NewTimer(100 * time.Millisecond)
    		_, err := ln.Accept()
    		ch <- err
    	}()
    
    	max := <-maxch
    	defer max.Stop()
    
    	select {
    	case err := <-ch:
    		if perr := parseAcceptError(err); perr != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 18:06:55 UTC 2024
    - 30K bytes
    - Viewed (0)
  2. pkg/util/async/bounded_frequency_runner.go

    func NewBoundedFrequencyRunner(name string, fn func(), minInterval, maxInterval time.Duration, burstRuns int) *BoundedFrequencyRunner {
    	timer := &realTimer{timer: time.NewTimer(0)} // will tick immediately
    	<-timer.C()                                  // consume the first tick
    	return construct(name, fn, minInterval, maxInterval, burstRuns, timer)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Nov 15 09:36:26 UTC 2022
    - 9.4K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. 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)
Back to top