Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for NewTimer (0.22 sec)

  1. doc/next/6-stdlib/1-time.md

    is in a module with a `go.mod` `go` line using Go 1.23.0 or later.
    When Go 1.23 builds older programs, the old behaviors remain in effect.
    The new [GODEBUG setting](/doc/godebug) [`asynctimerchan=1`](/pkg/time/#NewTimer)
    can be used to revert back to asynchronous channel behaviors
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  2. internal/http/server.go

    		}
    		return interval
    	}
    
    	// Wait for opened connection to be closed up to Shutdown timeout.
    	shutdownTimeout := srv.ShutdownTimeout
    	shutdownTimer := time.NewTimer(shutdownTimeout)
    	defer shutdownTimer.Stop()
    
    	timer := time.NewTimer(nextPollInterval())
    	defer timer.Stop()
    	for {
    		select {
    		case <-shutdownTimer.C:
    			if atomic.LoadInt32(&srv.requestCount) <= 0 {
    				return nil
    			}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 09 21:25:16 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  3. internal/dsync/dsync_test.go

    	if !dm.GetLock(ctx, cancel, id, source, Options{Timeout: 5 * time.Minute}) {
    		t.Fatal("GetLock() should be successful")
    	}
    
    	// Make it run twice.
    	timer := time.NewTimer(testDrwMutexRefreshInterval * 2)
    
    	select {
    	case <-ctx.Done():
    		t.Fatal("Lock context canceled which is not expected")
    	case <-timer.C:
    	}
    
    	// Should be safe operation in all cases
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 24 03:49:07 GMT 2022
    - 11K bytes
    - Viewed (0)
  4. cmd/license-update.go

    			}
    			time.Sleep(duration)
    		}
    	}()
    }
    
    func licenceUpdaterLoop(ctx context.Context, objAPI ObjectLayer) {
    	ctx, cancel := globalLeaderLock.GetLock(ctx)
    	defer cancel()
    
    	licenseUpdateTimer := time.NewTimer(licUpdateCycle)
    	defer licenseUpdateTimer.Stop()
    
    	for {
    		select {
    		case <-ctx.Done():
    			return
    		case <-licenseUpdateTimer.C:
    
    			if globalSubnetConfig.Registered() {
    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)
  5. cmd/callhome.go

    	if err != nil {
    		// lock timedout means some other node is the leader,
    		// cycle back return 'true'
    		return true
    	}
    
    	ctx = lkctx.Context()
    	defer locker.Unlock(lkctx)
    
    	callhomeTimer := time.NewTimer(globalCallhomeConfig.FrequencyDur())
    	defer callhomeTimer.Stop()
    
    	for {
    		if !globalCallhomeConfig.Enabled() {
    			// Stop the processing as callhome got disabled
    			return false
    		}
    
    		select {
    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)
  6. cmd/lock-rest-server.go

    // that have not been refreshed for some time.
    func lockMaintenance(ctx context.Context) {
    	if !globalIsDistErasure {
    		return
    	}
    
    	// Initialize a new ticker with 1 minute between each ticks.
    	lkTimer := time.NewTimer(lockMaintenanceInterval)
    	// Stop the timer upon returning.
    	defer lkTimer.Stop()
    
    	for {
    		// Verifies every minute for locks held more than 2 minutes.
    		select {
    		case <-ctx.Done():
    			return
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 5.9K bytes
    - Viewed (0)
  7. cmd/site-replication-utils.go

    		if st == ResyncFailed {
    			m.FailedBuckets = append(m.FailedBuckets, b)
    		}
    	}
    	return &m
    }
    
    // save in-memory stats to disk
    func (sm *siteResyncMetrics) save(ctx context.Context) {
    	sTimer := time.NewTimer(siteResyncSaveInterval)
    	defer sTimer.Stop()
    	for {
    		select {
    		case <-sTimer.C:
    			if globalSiteReplicationSys.isEnabled() {
    				sm.Lock()
    				wg := sync.WaitGroup{}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.9K bytes
    - Viewed (1)
  8. 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)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Apr 17 05:09:58 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  9. cmd/bucket-targets.go

    	}
    	clnt.SetCustomTransport(globalRemoteTargetTransport)
    	return clnt
    }
    
    // heartBeat performs liveness check on remote endpoints.
    func (sys *BucketTargetSys) heartBeat(ctx context.Context) {
    	hcTimer := time.NewTimer(defaultHealthCheckDuration)
    	defer hcTimer.Stop()
    	for {
    		select {
    		case <-hcTimer.C:
    			sys.hMutex.RLock()
    			eps := make([]madmin.ServerProperties, 0, len(sys.hc))
    			for _, ep := range sys.hc {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 20.9K bytes
    - Viewed (0)
  10. 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 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.1K bytes
    - Viewed (1)
Back to top