code: func (ac *asyncCallbacksHandler) pushOrClose(f func(), close bool) {
  	ac.mu.Lock()
  	defer ac.mu.Unlock()
  	// Make sure that library is not calling push with nil function,
  	// since this is used to notify the dispatcher that it should stop.
  	if !close && f == nil {
  		panic("pushing a nil callback")
  	}
  	cb := &asyncCB{f: f}
  	if ac.tail != nil {
  		ac.tail.next = cb
  	} else {
  		ac.head = cb
  	}
  	ac.tail = cb
  	if close {
  		ac.cond.Broadcast()
  	} else {
  		ac.cond.Signal()
  	}
  }
docs: // Add the given function to the tail of the list and
  // signals the dispatcher.