setQueueUpdated notifies the event loop that the queue has been updated and needs to be processed. It must be called while c.mu is held.
()
| 1054 | // setQueueUpdated notifies the event loop that the queue has been updated and needs to be processed. |
| 1055 | // It must be called while c.mu is held. |
| 1056 | func (c *Controller) setQueueUpdated() { |
| 1057 | if !c.queueUpdated { |
| 1058 | c.queueUpdated = true |
| 1059 | c.queueUpdatedCh <- struct{}{} |
| 1060 | } |
| 1061 | } |
| 1062 | |
| 1063 | // processQueue calls attempts to schedule the resources in c.queue. It is invoked in each iteration of the event loop when there are resources in the queue. |
| 1064 | // The reason we have the queue and process it from the event loop (instead of marking pending and scheduling directly from enqueue()) is to enable batch scheduling during initialization and when Lock/Unlock is used. |
no outgoing calls
no test coverage detected