Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for maybeRunChan (0.44 sec)

  1. src/runtime/chan.go

    // use non-blocking sends to fill the buffer).
    func timerchandrain(c *hchan) bool {
    	// Note: Cannot use empty(c) because we are called
    	// while holding c.timer.sendLock, and empty(c) will
    	// call c.timer.maybeRunChan, which will deadlock.
    	// We are emptying the channel, so we only care about
    	// the count, not about potentially filling it up.
    	if atomic.Loaduint(&c.qcount) == 0 {
    		return false
    	}
    	lock(&c.lock)
    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

    // See issue #25686.
    func badTimer() {
    	throw("timer data corruption")
    }
    
    // Timer channels.
    
    // maybeRunChan checks whether the timer needs to run
    // to send a value to its associated channel. If so, it does.
    // The timer must not be locked.
    func (t *timer) maybeRunChan() {
    	if t.astate.Load()&timerHeaped != 0 {
    		// If the timer is in the heap, the ordinary timer code
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 14:36:24 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  3. src/runtime/select.go

    		cas := &scases[i]
    
    		// Omit cases without channels from the poll and lock orders.
    		if cas.c == nil {
    			cas.elem = nil // allow GC
    			continue
    		}
    
    		if cas.c.timer != nil {
    			cas.c.timer.maybeRunChan()
    		}
    
    		j := cheaprandn(uint32(norder + 1))
    		pollorder[norder] = pollorder[j]
    		pollorder[j] = uint16(i)
    		norder++
    	}
    	pollorder = pollorder[:norder]
    	lockorder = lockorder[:norder]
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 13 21:36:04 UTC 2024
    - 15K bytes
    - Viewed (0)
Back to top