Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for afterFunc (0.22 sec)

  1. pkg/scheduler/framework/runtime/waiting_pods_map.go

    	// The time.AfterFunc calls wp.Reject which iterates through pendingPlugins map. Acquire the
    	// lock here so that time.AfterFunc can only execute after newWaitingPod finishes.
    	wp.mu.Lock()
    	defer wp.mu.Unlock()
    	for k, v := range pluginsMaxWaitTime {
    		plugin, waitTime := k, v
    		wp.pendingPlugins[plugin] = time.AfterFunc(waitTime, func() {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. src/crypto/rand/rand_plan9.go

    type reader struct {
    	mu      sync.Mutex
    	seeded  sync.Once
    	seedErr error
    	key     [32]byte
    }
    
    func (r *reader) Read(b []byte) (n int, err error) {
    	r.seeded.Do(func() {
    		t := time.AfterFunc(time.Minute, func() {
    			println("crypto/rand: blocked for 60 seconds waiting to read random data from the kernel")
    		})
    		defer t.Stop()
    		entropy, err := os.Open(randomDevice)
    		if err != nil {
    			r.seedErr = err
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 18:57:38 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  3. src/internal/poll/fd_plan9.go

    		}
    		fd.wtimedout = false
    	}
    	if !t.IsZero() && d > 0 {
    		// Interrupt I/O operation once timer has expired
    		if mode == 'r' || mode == 'r'+'w' {
    			var timer *time.Timer
    			timer = time.AfterFunc(d, func() {
    				fd.rmu.Lock()
    				defer fd.rmu.Unlock()
    				if fd.rtimer != timer {
    					// deadline was changed
    					return
    				}
    				fd.rtimedout = true
    				if fd.raio != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  4. src/cmd/trace/testdata/testprog/main.go

    func blockingSyscall(d time.Duration, done chan<- error) {
    	r, w, err := os.Pipe()
    	if err != nil {
    		done <- err
    		return
    	}
    	start := time.Now()
    	msg := []byte("hello")
    	time.AfterFunc(d, func() { w.Write(msg) })
    	_, err = syscall.Read(int(r.Fd()), make([]byte, len(msg)))
    	if err == nil && time.Since(start) < d {
    		err = fmt.Errorf("syscall returned too early: want=%s got=%s", d, time.Since(start))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 17:15:58 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  5. cni/pkg/nodeagent/cni-watcher.go

    			return
    		default:
    			// If the cniListener exits, at least we should record an error log
    			log.Errorf("CNI listener server exiting unexpectedly: %v", err)
    		}
    	}()
    
    	context.AfterFunc(s.ctx, func() {
    		if err := s.cniListenServer.Close(); err != nil {
    			log.Errorf("CNI listen server terminated with error: %v", err)
    		} else {
    			log.Debug("CNI listen server terminated")
    		}
    	})
    	return nil
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 21:31:35 UTC 2024
    - 6.7K bytes
    - Viewed (0)
Back to top