Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for timerchandrain (0.42 sec)

  1. src/runtime/chan.go

    		sg.releasetime = cputicks()
    	}
    	goready(gp, skip+1)
    }
    
    // timerchandrain removes all elements in channel c's buffer.
    // It reports whether any elements were removed.
    // Because it is only intended for timers, it does not
    // handle waiting senders at all (all timer channels
    // use non-blocking sends to fill the buffer).
    func timerchandrain(c *hchan) bool {
    	// Note: Cannot use empty(c) because we are called
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 25.9K bytes
    - Viewed (0)
  2. src/runtime/time.go

    	t.when = 0
    
    	if !async && t.isChan {
    		// Stop any future sends with stale values.
    		// See timer.unlockAndRun.
    		t.seq++
    	}
    	t.unlock()
    	if !async && t.isChan {
    		unlock(&t.sendLock)
    		if timerchandrain(t.hchan()) {
    			pending = true
    		}
    	}
    
    	return pending
    }
    
    // deleteMin removes timer 0 from ts.
    // ts must be locked.
    func (ts *timers) deleteMin() {
    	assertLockHeld(&ts.mu)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
Back to top