Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/net/http/transport.go

    func (pc *persistConn) waitForContinue(continueCh <-chan struct{}) func() bool {
    	if continueCh == nil {
    		return nil
    	}
    	return func() bool {
    		timer := time.NewTimer(pc.t.ExpectContinueTimeout)
    		defer timer.Stop()
    
    		select {
    		case _, ok := <-continueCh:
    			return ok
    		case <-timer.C:
    			return true
    		case <-pc.closech:
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 91K bytes
    - Viewed (0)
  2. cmd/bucket-replication.go

    // PersistToDisk persists in-memory resync metadata stats to disk at periodic intervals
    func (s *replicationResyncer) PersistToDisk(ctx context.Context, objectAPI ObjectLayer) {
    	resyncTimer := time.NewTimer(resyncTimeInterval)
    	defer resyncTimer.Stop()
    
    	// For each bucket name, store the last timestamp of the
    	// successful save of replication status in the backend disks.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 06:56:12 UTC 2024
    - 114.4K bytes
    - Viewed (0)
  3. src/database/sql/fakedb_test.go

    		stmt.cmd = cmd
    		parts = parts[1:]
    
    		if c.waiter != nil {
    			c.waiter(ctx)
    			if err := ctx.Err(); err != nil {
    				return nil, err
    			}
    		}
    
    		if stmt.wait > 0 {
    			wait := time.NewTimer(stmt.wait)
    			select {
    			case <-wait.C:
    			case <-ctx.Done():
    				wait.Stop()
    				return nil, ctx.Err()
    			}
    		}
    
    		c.incrStat(&c.stmtsMade)
    		var err error
    		switch cmd {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 01 12:38:07 UTC 2024
    - 30.3K bytes
    - Viewed (0)
  4. cmd/xl-storage-disk-id-check.go

    			}
    		}
    
    		// Offset checks a bit.
    		time.Sleep(time.Duration(rng.Int63n(int64(1 * time.Second))))
    
    		dctx, dcancel := context.WithCancel(ctx)
    		started := time.Now()
    		go func() {
    			timeout := time.NewTimer(globalDriveConfig.GetMaxTimeout())
    			select {
    			case <-dctx.Done():
    				if !timeout.Stop() {
    					<-timeout.C
    				}
    			case <-timeout.C:
    				spent := time.Since(started)
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:51:27 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  5. src/net/http/client.go

    	stopTimerCh := make(chan struct{})
    	var once sync.Once
    	stopTimer = func() {
    		once.Do(func() {
    			close(stopTimerCh)
    			if cancelCtx != nil {
    				cancelCtx()
    			}
    		})
    	}
    
    	timer := time.NewTimer(time.Until(deadline))
    	var timedOut atomic.Bool
    
    	go func() {
    		select {
    		case <-initialReqCancel:
    			doCancel()
    			timer.Stop()
    		case <-timer.C:
    			timedOut.Store(true)
    			doCancel()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 06:06:11 UTC 2024
    - 33.7K bytes
    - Viewed (0)
  6. src/internal/fuzz/worker.go

    		// Per https://golang.org/pkg/os/#Signal, “Interrupt is not implemented on
    		// Windows; using it with os.Process.Signal will return an error.”
    		// Fall back to Kill instead.
    		sig = os.Kill
    	}
    
    	t := time.NewTimer(workerTimeoutDuration)
    	for {
    		select {
    		case <-w.termC:
    			// Worker terminated.
    			t.Stop()
    			<-closeC
    			w.cmd = nil
    			w.client = nil
    			return w.waitErr
    
    		case <-t.C:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  7. pilot/pkg/bootstrap/server.go

    					}
    					close(stopped)
    				}
    			}()
    			s.grpcServer.GracefulStop()
    			if s.secureGrpcServer != nil {
    				s.secureGrpcServer.GracefulStop()
    			}
    			close(stopped)
    		}()
    
    		t := time.NewTimer(s.shutdownDuration)
    		select {
    		case <-t.C:
    			s.grpcServer.Stop()
    			if s.secureGrpcServer != nil {
    				s.secureGrpcServer.Stop()
    			}
    		case <-stopped:
    			t.Stop()
    		}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 17:48:28 UTC 2024
    - 46.3K bytes
    - Viewed (0)
  8. cmd/iam.go

    		// Calculate a random value such that 0 <= value < baseInterval
    		randAmt := time.Duration(r.Float64() * float64(baseInterval))
    		return baseInterval/2 + randAmt
    	}
    
    	timer := time.NewTimer(waitInterval())
    	defer timer.Stop()
    
    	for {
    		select {
    		case <-timer.C:
    			// Load all IAM items (except STS creds) periodically.
    			refreshStart := time.Now()
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Jun 13 22:26:38 UTC 2024
    - 71.9K bytes
    - Viewed (0)
  9. pkg/controller/endpoint/endpoints_controller_test.go

    }
    
    // waitForChanReceive blocks up to the timeout waiting for the receivingChan to receive
    func waitForChanReceive(t *testing.T, timeout time.Duration, receivingChan chan struct{}, errorMsg string) {
    	timer := time.NewTimer(timeout)
    	select {
    	case <-timer.C:
    		t.Errorf(errorMsg)
    	case <-receivingChan:
    	}
    }
    
    func TestEndpointSubsetsEqualIgnoreResourceVersion(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 06:51:56 UTC 2024
    - 87.7K bytes
    - Viewed (0)
  10. src/cmd/internal/testdir/testdir_test.go

    			// common problem here, it would be worth porting over
    			// that code as well. See https://do.dev/issue/50973
    			// for more discussion.
    			if err == nil {
    				tick := time.NewTimer(time.Duration(tim) * time.Second)
    				done := make(chan error)
    				go func() {
    					done <- cmd.Wait()
    				}()
    				select {
    				case err = <-done:
    					// ok
    				case <-tick.C:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:08:06 UTC 2024
    - 57.5K bytes
    - Viewed (0)
Back to top