cancel cancels the invocation. It can be called multiple times with different reschedule values, and will be rescheduled if any of the calls ask for it. It's not thread-safe (must be called while the controller's mutex is held).
(reschedule bool)
| 1577 | // It can be called multiple times with different reschedule values, and will be rescheduled if any of the calls ask for it. |
| 1578 | // It's not thread-safe (must be called while the controller's mutex is held). |
| 1579 | func (i *invocation) cancel(reschedule bool) { |
| 1580 | if i.cancelledOn.IsZero() { |
| 1581 | i.cancelledOn = time.Now() |
| 1582 | i.cancelFn() |
| 1583 | } |
| 1584 | i.reschedule = i.reschedule || reschedule |
| 1585 | } |
| 1586 | |
| 1587 | // addToWaitlist adds a resource name to the invocation's waitlist. |
| 1588 | // Resources on the waitlist will be scheduled after the invocation completes. |
no test coverage detected